August 1999
Intermediate to advanced
1488 pages
72h 53m
English
string.lastIndexOf(string, num) string.lastIndexOf(string)
The lastIndexOf() method of an instance of the String object returns the indexed start position of the string passed, starting from the right and going left. Additionally, you can specify an index, defined by num in the syntax definition, to start your search for the string specified. This method is the same as the String.indexOf() method, but it starts at the end of the string.
Listing 6.242 creates a simple instance of the String object. This instance is then passed to the lastIndexOf() method on two occasions with the result written to the user's page. The ...
Read now
Unlock full access