def trim_end.cons
import bend-kit-http@0.38.2.0/http.bend as Httpimport Base
183def trim_end.cons(h: Char, r: String, space: Bool) -> String:
184 match r:
185 case SNil{}:
186 match space:
187 case True{}:
188 SNil{}
189 case False{}:
190 SCon{h, SNil{}}
191 case SCon{a, t}:
192 SCon{h, SCon{a, t}}