1
0
forked from Mirror/wren

docs; string; clarify indexOf(_,_) to be clearer

This commit is contained in:
ruby0x1
2021-05-16 12:17:31 -07:00
parent f09ebf6acc
commit 9903ddf76b

View File

@ -148,8 +148,9 @@ It is a runtime error if `search` is not a string.
### **indexOf**(search, start) ### **indexOf**(search, start)
Returns the index of the first byte matching `search` in the string or `-1` if Returns the index of the first byte matching `search` in the string or `-1` if
`search` was not found, starting a byte offset `start`. The start can be `search` was not found, starting at byte offset `start`. The `start` offset can
negative to count backwards from the end of the string. also be negative, which will be offset relative to end of the string instead.
Searches forward, from the offset to the end of the string.
It is a runtime error if `search` is not a string or `start` is not an integer It is a runtime error if `search` is not a string or `start` is not an integer
index within the string's byte length. index within the string's byte length.