/proc/findlasttext(Haystack, Needle, Start, End)
Arguments:
Haystack: The string to search through.
Needle: The text to search for.
Start = 1: The byte position in the string to start searching at. As this is searching backwards, this defaults to the end of the string.
End = 0: The byte position immediately before the last character that should be searched.
Returns:
num: The position in the string of the first match; 0 if no match was found.

The comparison occurs case insensitively - for the case sensitive version, see findlasttextex.md.

world.log << findlasttext("FooFoo", "foo") // 4
world.log << findlasttext("FooFoo", "foo", 3) // 1

See also: