{{luaapi}}
No edit summary |
({{luaapi}}) |
||
| Line 1: | Line 1: | ||
{{ | {{luaapi}} | ||
string.find(s, pattern [, init [, plain]]) | string.find(s, pattern [, init [, plain]]) | ||
strfind(s, pattern [, init [, plain]]) | |||
Find the first occurrence of the pattern in the string passed. If an instance of the pattern is found a pair of values representing the start and end of the string is returned. If the pattern cannot be found nil is returned. | Find the first occurrence of the pattern in the string passed. If an instance of the pattern is found a pair of values representing the start and end of the string is returned. If the pattern cannot be found nil is returned. | ||
| Line 35: | Line 36: | ||
firstWord = "Phase2" | firstWord = "Phase2" | ||
restOfString = "There isn't any need for iterating over this mini-string." | restOfString = "There isn't any need for iterating over this mini-string." | ||