str_find
Returns the position of first occurrence of pattern in string, or -1 if not found.
str_find(
str,
pattern
) -> NUMBER
Returns the position of first occurrence of pattern in string, or -1 if not found.
Syntaxe
var result = str_find("Hello World", "World"); // 6\nvar result2 = str_find("Hello World", "xyz"); // -1
Arguments
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
str | yes | - | String to search in | |
pattern | yes | - | Substring to find |