Function
Native
string.find
Looks for the first match of <code>pattern</code> in the string.
Syntax
string.find(haystack, needle, startPos, noPatterns)
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
haystack
|
string | — | The string to search in. |
needle
|
string | — | The string to find, can contain patterns if enabled. |
startPos
|
number | — | The position to start the search from, can be negative start position will be relative to the end position. |
noPatterns
|
boolean | — | Disable patterns. |
Returns
- number
- number
- string