mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
re-indented.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
34033db665
commit
a4d9a91b96
1 changed files with 1 additions and 1 deletions
2
string.c
2
string.c
|
@ -848,7 +848,7 @@ rb_str_index(str, sub, offset)
|
|||
if (RSTRING(str)->len - offset < RSTRING(sub)->len) return -1;
|
||||
if (RSTRING(sub)->len == 0) return offset;
|
||||
pos = rb_memsearch(RSTRING(sub)->ptr, RSTRING(sub)->len,
|
||||
RSTRING(str)->ptr+offset, RSTRING(str)->len-offset);
|
||||
RSTRING(str)->ptr+offset, RSTRING(str)->len-offset);
|
||||
if (pos < 0) return pos;
|
||||
return pos + offset;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue