index string, substr, [start]
- Returns the position of the first occurrence of substr in string. The start, if specified, specifies the position to start looking in the string. Positions are integer numbers based at
0
. If the substring is not found, the index
function returns -1
.