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
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…
x
Reference in New Issue
Block a user