def scalar
import emerging-ezjson@1.3.0.0/src/print.bend as Printimport Base
28# whether a code point is a Unicode scalar value: not a surrogate, and not
29# past U+10FFFF. No UTF-8 JSON text can hold any other
30def scalar(+cp: U32) -> Bool:
31 Bool.not(Bool.or(Bool.and(U32.is_ge(cp, 55296), U32.is_le(cp, 57343)), U32.is_gt(cp, 1114111)))