- search in the string to search in
- find is the string you're trying to find
- end is the (optional) ending position (i.e. where the string is truncated before the search is performed)
This function searches through the string search, looking for the string find. This function returns the position where find last occurs in search. This function returns a 0-indexed value, meaning that the first character of search counts as 0.
Returns the last instance of the phrase "la" in the following phrase.Would result in:
Returns the last instance of the phrase "la", ignoring the last three characters.Would result in:
If find does not occur in search, this function returns -1.