String.lastIndexOf()

Availability

Flash Player 5.

Usage

my_str.lastIndexOf(substring, [startIndex])

Parameters

substring An integer or string specifying the string to be searched for.

startIndex An optional integer specifying the starting point to search for substring.

Returns

The position of the last occurrence of the specified substring, or -1.

Description

Method; searches the string from right to left and returns the index of the last occurrence of substring found before startIndex within the calling string. If substring is not found, the method returns -1.

See also

String.indexOf()