string. find
functionimplementedavailable in: camelot
Returns a pair of numbers representing the start and end of the first occurrence of the pattern within the string, if it exists.
The client has this function, but Blizzard's documentation leaves it out, so its parameters and results aren't known.
Parameters
| name | type | description |
|---|---|---|
string | string | The string to examine. |
pattern | string | The pattern to search for within string. This pattern is similar to Unix regular expressions, but is not the same -- see Lua Pattern matching for more details. |
initpos | number | Index of the character within string to begin searching. As is usual for Lua string functions, 1 refers to the first character of the string, 2 to the second, etc. -1 refers to the last character of the string, -2 to the second last, etc. If this argument is omitted, it defaults to 1; i.e., the search begins at the beginning of string. |
plain | boolean | Whether or not to disable regular expression matching. Defaults to false, so regex matching is usually enabled. |
Returns
| # | name | type | description |
|---|---|---|---|
| 1 | startPos | number | The position of the first character of the first occurrence of the pattern. |
| 2 | endPos | number | The position of the last character of the first occurrence of the pattern. |
In wowlua's emulated client
implementedwowlua models the system behind it. what the statuses mean
sources
Description: warcraft.wiki.gg's API pages ↗, by its contributors, CC BY-SA 4.0 ↗.