Synopsis Find the last occurrence of a string in another string.
Function int findLast(str subject, str find)
Usage import String;
Description Find the last occurrence of string find in string subject. The result is either a position in subject or -1 when find is not found.

Also see findAll and findFirst.
rascal>import String;
rascal>findLast("abracadabra", "a");
int: 10
rascal>findLast("abracadabra", "bra");
int: 8
rascal>findLast("abracadabra", "e");
int: -1
Is this page unclear, or have you spotted an error? Please add a comment below and help us to improve it. For all other questions and remarks, visit