1
0
Fork 0
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:
nobu 2003-02-07 06:36:53 +00:00
parent 34033db665
commit a4d9a91b96

View file

@ -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;
}