Reference

Class

RiString

Name

indexOf

Description Returns the index within this string of the first occurrence of the 'searchstring'
Syntax
indexOf(searchstring);
indexOf(searchstring, start);
Parameters
Stringsearchstring 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 first index of the matching pattern or -1 if not found
Example
myRiString = new RiString("apple"); 
myRiString.indexOf("a"); // returns 0
Platform Java / Javascript