UTF-16
Work with UTF-16 in Rust.
Differences to other crates
utf16string-realhydroper-utf16uses code units asu16instead of octets for indexing strings, as opposed toutf16string.
Converting offsets between UTF-8 and UTF-16
Use the utils submodule for converting between offset encodings:
use ;
let utf8string = "a\u{10FFFF}b\u{10000}";
let utf16string = from;
// (start: usize, end: usize)
assert_eq!;
assert_eq!;