def utf8.len
import cswap-bend-cli@0.1.0.0/b64.bend as B64import Base
44# Continuation bytes a lead byte announces.
45def utf8.len(+b: U32) -> U32:
46 sel(U32.is_lt(b, 128), 0, sel(U32.is_lt(b, 224), 1, sel(U32.is_lt(b, 240), 2, 3)))
import cswap-bend-cli@0.1.0.0/b64.bend as B64import Base
44# Continuation bytes a lead byte announces.
45def utf8.len(+b: U32) -> U32:
46 sel(U32.is_lt(b, 128), 0, sel(U32.is_lt(b, 224), 1, sel(U32.is_lt(b, 240), 2, 3)))