def text.rstrip.lone
import ezsys@0.1.0.0/src/str.bend as Strimport 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{}}