String module

trim_right

procedure · 1 overloadSource

s without the chars at its end; the result points into s.

trim_right :: (s: string, chars := DEFAULT_SPACES) -> string

Parameters

s: string
chars := DEFAULT_SPACES

Returns

string
ExampleOpen in playground ↗
assert(trim_right("  hi ") == "  hi");

See also