Expand description
Provides iteration by char
over &[u16]
containing potentially-invalid
UTF-16 such that errors are replaced with the REPLACEMENT CHARACTER.
The trait Utf16CharsEx
provides the convenience method chars()
on
byte slices themselves instead of having to use the more verbose
Utf16Chars::new(slice)
.
Structs§
- Iterator by
Result<char,Utf16CharsError>
over&[u16]
that contains potentially-invalid UTF-16. There is exactly oneUtf16CharsError
per each unpaired surrogate. - An iterator over the
char
s and their positions. - Iterator by
char
over&[u16]
that contains potentially-invalid UTF-16. See the crate documentation. - A type for signaling UTF-16 errors.
Traits§
- Convenience trait that adds
chars()
andchar_indices()
methods similar to the ones on string slices tou16
slices.