indexOf()

Returns the index of a substring within the current String.

Syntax

Numeric indexOf(String s [, Numeric index ])
  1. s is the substring to search for.
  2. index (optional) is the byte position from which to start the search.

Usage

Returns -1 if the substring is not found.