def byte_escape

cli@0.2.0.0 · cli.bend:7948

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

7948# U+DC00 plus byte b, PEP 383's escape for a byte that starts no
7949# well-formed UTF-8 sequence; U+FFFD for a value past 255, no byte.
7950def byte_escape(+b: U32) -> Char:
7951  Chr{Bool.pick(U32, U32.is_le(b, 255), (b + 56320 : U32), 65533)}

Uses (5)

Used by (2)