find(str,substr[,modifiers][,start_pos])
find(str,substr[,start_pos][,modifiers])
Searches a string for a substring and returns the first position
at which it’s found, or zero (0) if it’s not found. For a descrip-
tion of start_pos see any<chartype> (p. 10). modifiers is one
or more of the values listed in the following table.
modifiers Means
i Ignore character case during the search. If this modifier
is omitted, the search is case-sensitive.
t Trim trailing spacing from str and substr.
Examples:
str='She sells seashells? Yes, she does.';
find(str,'she ') → 27.
find(str,'she ','i') → 1.
find(str,'she ','i',5) → 27.
find(str,'she ','it',5) → 14.
find(str,'she ','it') → 1.
|