Skip to content

Commit

Permalink
Fix documentation for String#index and String#byterindex
Browse files Browse the repository at this point in the history
  • Loading branch information
byroot committed Sep 4, 2024
1 parent ae98d19 commit 036ca72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions string.c
Original file line number Diff line number Diff line change
Expand Up @@ -4480,7 +4480,7 @@ rb_str_rindex(VALUE str, VALUE sub, long pos)
* $~ #=> #<MatchData "oo">
*
* Integer argument +offset+, if given and non-negative, specifies the maximum starting position in the
* string to _end_ the search:
* string to _end_ the search:
*
* 'foo'.rindex('o', 0) # => nil
* 'foo'.rindex('o', 1) # => 1
Expand Down Expand Up @@ -4613,7 +4613,7 @@ rb_str_byterindex(VALUE str, VALUE sub, long pos)
* $~ #=> #<MatchData "oo">
*
* Integer argument +offset+, if given and non-negative, specifies the maximum starting byte-based position in the
* string to _end_ the search:
* string to _end_ the search:
*
* 'foo'.byterindex('o', 0) # => nil
* 'foo'.byterindex('o', 1) # => 1
Expand Down

0 comments on commit 036ca72

Please sign in to comment.