findLast
Returns the index of the last substring match.
Example
Find the index of the last “a” in “banana”.
findLast("a", "banana")This example returns 5.
Syntax
findLast(string expr s, string expr field)- s: the string to search for
- field: the string to be searched
Both s and field are expressions evaluating to strings.
Returns
int
Notes
findLast finds the last occurrence of a string within another string. The index returned corresponds to where s first matches in field. If there is no match, findLast returns -1.