Contents | Index | < Browse | Browse >
FIND(<haystack>, <needle>)
returns a number
Locates the blank-delimited word or words <needle> within the string
<haystack> and returns the word position of the first match, or 0 if there
is no match.
The search is case sensitive.
Examples:
say find('Tied to Godot?','dot'); >>> 0
say find('Tied to Godot?','to'); >>> 2
Also see
In some implementations of REXX, this function is called WORDPOS() and
takes arguments in the reverse order.
Next: INDEX() | Prev: COMPARE() | Contents: Comparison functions