def utf8.three
import emerging-ezhttp@0.21.0.0/src/pct.bend as Pctimport Base
43# three bytes below U+10000, else four
44def utf8.three(+cp: U32, fits: Bool) -> List<&2, U32>:
45 match fits:
46 case True{}:
47 [U32.or(224, U32.shrn(cp, 12n)), cont(cp, 6n), cont(cp, 0n)]
48 case False{}:
49 utf8.four(cp)