def trim_end
import bend-kit-http@0.38.2.0/http.bend as Httpimport Base
194# String.trim_end without the two reversed copies.
195def trim_end(s: String) -> String:
196 match s:
197 case SNil{}:
198 SNil{}
199 case SCon{+h, t}:
200 trim_end.cons(h, trim_end(t), Char.is_space(h))