title: indexOf - test layout: api

indexOf

Returns the index within this string of the first occurrence of the specified character, starting from the specified startIndex.

Parameters

ignoreCase - true to ignore character case when matching a character. By default false.

Returns An index of the first occurrence of char or -1 if none is found.