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
uis a high surrogate (in the range 0xD800..=0xDBFF). - is_
low_ surrogate - Returns true if
uis 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