$indexOf
Returns the character index of a 'query' within 'text'.
Usage
This function has two params.
Param | Description | Type | Required |
---|---|---|---|
text | The text that gets searched for 'query'. | String | Yes |
query | The phrase/character to find within 'text'. | String | Yes |
Remember the case of characters in `$indexOf[]` matters (e.g. searching for a lowercase `h` within `Hello` won't work). You can use [`$toLowerCase[]`](./tolowercase.md) to negate this issue.
Examples
Example #1
Example #2
Example #3
Example #4
Last updated