def text.rstrip.put

ezsys@0.1.0.0 · src/str.bend:55

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

55# a character before the stripped rest: when nothing is left after it, it
56# goes too if it is whitespace
57def text.rstrip.put(+hd: Char, rule: String) -> String:
58  match rule:
59    case SNil{}:
60      text.rstrip.lone(text.space(hd), hd)
61    case SCon{a, b}:
62      SCon{hd, SCon{a, b}}

Uses (4)

Used by (1)