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

pos


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

Returns the position in the receiving buffer of another string, [needle] . (See also .) It returns 0 if [needle] is the null string or is not found or if [start] is greater than the length of the receiving buffer. By default, the search starts at the first character of the receiving buffer (that is, the value of [start] is 1). You can override this by specifying [start] (which must be a positive whole number), the point at which the search starts.

Class MUTABLEBUGGER - pos method

x1 = .mutablebuffer~new("Saturday")
x1~pos("day")       ->    6
x1 = .mutablebuffer~new("abc def ghi")
x1~pos("x")         ->    0
x1~pos(" ")         ->    4
x1~pos(" ",5)       ->    8

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