indexOf()

The indexOf() function returns the position of a substring in a string.

Sytnax

indexOf(expr1, expr2)
Note:
  1. Return position of substring string(expr2) in string(expr1) [return -1 ifstring(expr2) is not found in string(expr1)].