def text.rstrip.lone

ezsys@0.1.0.0 · src/str.bend:47

import ezsys@0.1.0.0/src/str.bend as Str
import Base

47# a lone last character: gone when it is whitespace
48def text.rstrip.lone(sp: Bool, hd: Char) -> String:
49  match sp:
50    case True{}:
51      SNil{}
52    case False{}:
53      SCon{hd, SNil{}}

Uses (3)

Used by (1)