def utf8.two

emerging-ezhttp@0.21.0.0 · src/pct.bend:51

import emerging-ezhttp@0.21.0.0/src/pct.bend as Pct
import Base

51# two bytes below U+0800, else more
52def utf8.two(+cp: U32, fits: Bool) -> List<&2, U32>:
53  match fits:
54    case True{}:
55      [U32.or(192, U32.shrn(cp, 6n)), cont(cp, 0n)]
56    case False{}:
57      utf8.three(cp, U32.is_lt(cp, 65536))

Uses (8)

Used by (1)