Contents | Index | < Browse | Browse >
POS(<needle>,<haystack>,[<startpos>])
returns a number
The result is the character position within the string <haystack> of the
the first occurrence of the string <needle> or 0 if a match isn't found.
If <startpos> is specified, then the search proceeds forward from that
position in <haystack>.
The search is case sensitive.
Examples:
say pos('eak','growing weaker and weaker') >>> 10
say pos('eak','growing weaker and weaker',11) >>> 21
Also see
Next: VERIFY() | Prev: LASTPOS() | Contents: Comparison functions