Cli.utf8_scalar: def of cli@0.2.0.0 Import: import cli@0.2.0.0/cli.bend as Cli Lines 7940-7946 of cli@0.2.0.0/cli.bend: https://jend.leeeet.dev/read.txt?path=cli@0.2.0.0/cli.bend&start_line=7940&end_line=7946 import Base # A decoded code point, if it is a Unicode scalar at least least. def utf8_scalar(found: Maybe<&2, U32>, least: U32) -> Maybe<&2, U32>: match found: case None{}: None{} case Some{+x}: utf8_next(Bool.and(Bool.and(U32.is_ge(x, least), U32.is_le(x, 1114111)), U32.is_ge((x - 55296 : U32), 2048)), Some{x}) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_ge https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_le https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.sub https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=utf8_next