def utf.byte
import emerging-ezhttp@0.21.0.0/src/qs.bend as Qsimport Base
245# a byte inside a sequence: it continues it when it fits, else the sequence
246# so far is one U+FFFD and the byte is read again between characters
247def utf.byte(+cp: U32, left: Nat, +b: U32, k: Utf -> String, fits: Bool)
248 -> String:
249 match fits:
250 case True{}:
251 utf.more(cp, left, b, k)
252 case False{}:
253 SCon{fffd(), utf.lead(b, k, lead(b))}