|
pos
>>-pos(needle-+---------------------------+-)---><
+-,--+-------+--+---------+-+
+-start-+ +-,length-+
Returns the position in the receiving string of another string,
[needle]
. (See also
.) It returns
String class - pos method
"Saturday"~pos("day") -> 6
"abc def ghi"~pos("x") -> 0
"abc def ghi"~pos(" ") -> 4
"abc def ghi"~pos(" ",5) -> 8
"abc def ghi"~pos(" ",5,3) -> 0
|