def unr
import ezmcp@0.1.0.0/src/sse.bend as Sseimport Base
21# a line's text with one `\r` at its end dropped
22def unr(text: String) -> String:
23 match text:
24 case SNil{}:
25 SNil{}
26 case SCon{+head, +tail}:
27 unr.at(head, _u => unr(tail),
28 Bool.and(Char.is_eq(head, '\r'), String.is_empty(tail)))