Read Me - Common Public License V1.0 - Copyright Notice(©)

lastPos


>>-lastPos(needle-+---------------------------+-)---><
                  +-,--+-------+--+---------+-+
                       +-start-+  +-,length-+

Returns the position of the last occurrence of a string, [needle] , in the receiving string. (See also .) It returns 0 if [needle] is the null string or not found. By default, the search starts at the last character of the receiving string 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] .

String class - lastPos method

"abc def ghi"~lastPos(" ")      ->    8
"abcdefghi"~lastPos(" ")        ->    0
"efgxyz"~lastPos("xy")          ->    4
"abc def ghi"~lastPos(" ",7)    ->    4
"abc def ghi"~lastPos(" ",7,3)  ->    0

Read Me - Common Public License V1.0 - Copyright Notice(©)