Fix documentation for String#index and String#byterindex
This commit is contained in:
parent
ae98d19cf9
commit
036ca726bb
Notes:
git
2024-09-04 09:26:39 +00:00
4
string.c
4
string.c
@ -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
|
||||
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user