String module

eat_until_space

procedure · 1 overloadSource

The part of _s before its first space, tab or line break, or all of it when it has none.

eat_until_space :: (_s: string) -> string

Parameters

_s: string

Returns

string
ExampleOpen in playground ↗
assert(eat_until_space("word and more") == "word");
assert(eat_until_space("single") == "single");

See also