Module unicode

Available on crate features __ecma and __utils only.

Functionsยง

code_point_to_pair
Converts a Unicode code point to UTF-16 surrogate pair. Returns (high_surrogate, low_surrogate) both as u32.
is_high_surrogate
Returns true if u is a high surrogate (in the range 0xD800..=0xDBFF).
is_low_surrogate
Returns true if u is a low surrogate (in the range 0xDC00..=0xDFFF).
pair_to_code_point
Converts UTF-16 surrogate pair to Unicode code point. https://tc39.es/ecma262/#sec-utf16decodesurrogatepair