def pair

bend-net-json@0.3.0.0 · json.bend:171

import bend-net-json@0.3.0.0/json.bend as Json
import Base

171# §8.2: a high surrogate pairs with a following \uDC00-\uDFFF; a lone one is U+FFFD.
172def pair(+hi: U32, +rest: String) -> Esc:
173  Bool.pick(Esc, String.starts_with(rest, "\\u"), pair.lo(hi, rest, hex4(String.drop(rest, 2n))), Esc{65533, rest})

Uses (8)

Used by (1)