def unr

ezmcp@0.1.0.0 · src/sse.bend:21

import ezmcp@0.1.0.0/src/sse.bend as Sse
import 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)))

Uses (6)

Used by (1)