Definition: | integer res = find_any(object needles, sequence haystack, integer start=1) |
Description: |
Find any element from a list inside a sequence. Returns the location of the first hit.
needles: the list of items to look for haystack: a sequence in which "needles" are looked for start: the starting point of the search. Defaults to 1. Returns the smallest index in haystack of an element of needles, or 0 if no needle is found. |
Comments: | This routine is defined in builtins/pfindany.e (an autoinclude) and is provided only for compatibility with OpenEuphoria. |
Example: |
location = find_any("aeiou", "John Smith", 3) -- location is 8 location = find_any("aeiou", "John Doe") -- location is 2 |