def Utf8.fresh.st

bend-kube-runtime@0.2.0.0 · src/utf8.bend:42

import bend-kube-runtime@0.2.0.0/src/utf8.bend as Utf8
import Base

42# The fresh-byte case: the state and the chars a lead byte makes.
43def Utf8.fresh.st(+b: U32, +k: U32, mid: Bool) -> Utf8:
44  match mid:
45    case True{}:
46      Utf8{U32.and(b, U32.shrn(63, U32.to_nat(k))), k}
47    case False{}:
48      Utf8{0, 0}

Uses (6)

Used by (1)