Whether any of the substrings appears in s, and the part of s after the earliest match. At one
position the first substring listed wins. Empty substrings are ignored.
contains_any_string :: (
s: string,
substrings: ..string
) -> (found: bool, remainder: string)
Parameters
- s: string
- substrings: ..string
Returns
- found: bool
- remainder: string
found, rest := contains_any_string("say hello world", "world", "hello");
assert(found && rest == " world");