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

lastPos


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

Returns the position of the last occurrence of a string, [needle] , in the receiving buffer. (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 buffer and scans backward. You can override this by specifying [start] , the point at which the backward scan starts. The [start] must be a positive whole number and defaults to receiving_buffer~length if larger than that value or omitted.

Class MUTABLEBUGGER - lastPos method

x1 - .mutablebuffer~new("abc def ghi")
x1~lastPos(" ")      ->    8
x1 - .mutablebuffer~new("abcdefghi")
x1~lastPos(" ") -> 0
x1 - .mutablebuffer~new("efgxyz")
x1~lastPos("xy")     ->    4
x1 - .mutablebuffer~new("abc def ghi")
x1~lastPos(" ",7) -> 4

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