String module

contains_any_character

procedure · 1 overloadSource

Whether any byte of chars appears in s, and the part of s after the first such byte.

contains_any_character :: (
    s: string,
    chars: string
) -> (found: bool, remainder: string)

Parameters

s: string
chars: string

Returns

found: bool
remainder: string
ExampleOpen in playground ↗
found, rest := contains_any_character("a,b;c", ";,");
assert(found && rest == "b;c");

See also