Function bczhc_lib::utf8::surrogate_pair_to_unicode
source · pub fn surrogate_pair_to_unicode(lead: u16, trail: u16) -> u32Expand description
Examples
use bczhc_lib::utf8::surrogate_pair_to_unicode;
let unicode = surrogate_pair_to_unicode(0xd83c, 0xdf47);
assert_eq!(std::char::from_u32(unicode).unwrap(), '🍇');