Reference

Class

RiString

Name

lastIndexOf

Description Returns the index within this string of the last occurrence of the specified character
Syntax
lastIndexOf(searchstring);
lastIndexOf(searchstring, start);
Parameters
Stringwhat to search for
int(Optional) The start position in the string to start the search. If omitted, the search starts from position 0
Returns
intthe last index of the matching pattern or -1 if none are found
Example
myRiString = new RiString("apple"); 
myRiString.lastIndexOf("p"); // returns 2
Platform Java / Javascript