WoW:API strfind: Difference between revisions

m
Move page script moved page API strfind to WoW:API strfind without leaving a redirect
No edit summary
m (Move page script moved page API strfind to WoW:API strfind without leaving a redirect)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{:Lua/Libshortcut|strfind|string.find}}
{{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."
{{LUA}}
Anonymous user