def utf8_lead

cli@0.2.0.0 · cli.bend:7916

import cli@0.2.0.0/cli.bend as Cli
import Base

7916def utf8_lead(+b: U32) -> Utf8Lead:
7917  Bool.pick(Utf8Lead, U32.is_lt(b, 194), NotLead{},
7918    Bool.pick(Utf8Lead, U32.is_lt(b, 224), Utf8Lead{1n, (b - 192 : U32), 128},
7919      Bool.pick(Utf8Lead, U32.is_lt(b, 240),
7920        Utf8Lead{2n, (b - 224 : U32), 2048},
7921        Bool.pick(Utf8Lead, U32.is_lt(b, 245),
7922          Utf8Lead{3n, (b - 240 : U32), 65536}, NotLead{}))))

Uses (5)

Used by (1)