>>-LASTPOS(needle,haystack-+---------------------------+--)---------------------->< +-,--+-------+--+---------+-+ +-start-+ +-,length-+
0
if needle is a null string or not found. By default, the search starts at the last character of haystack and scans backward to the beginning of the string. You can override this by specifying start, the point at which the backward scan starts and length, the range of characters to scan. The start must be a positive whole number and defaults to receiving_string~length
if larger than that value or omitted. The length must be a non-negative whole number and defaults to start.
Example 7.49. Builtin function LASTPOS
LASTPOS(" ","abc def ghi") -> 8 LASTPOS(" ","abcdefghi") -> 0 LASTPOS("xy","efgxyz") -> 4 LASTPOS(" ","abc def ghi",7) -> 4 LASTPOS(" ","abc def ghi",7,3) -> 0