String module

stop_at_any

procedure · 1 overloadSource

The part of s before the first byte that is in bytes, or all of s when there is none.

stop_at_any :: (s: string, bytes: string) -> string

Parameters

s: string
bytes: string

Returns

string
ExampleOpen in playground ↗
assert(stop_at_any("name=value", "=:") == "name");

See also