String.indexOf
indexOf — Finds the position of the first occurrence of a string within a string.
Description
String.indexOf(string string, [integer offset])
Parameters
Name | Description | Type | Default | Optional |
---|---|---|---|---|
string | string | No | ||
offset | integer | Yes |
Return values
number primitive.
Examples
Example #1 – indexOf example