Skip to main content

Crate mozjs_utf16_iter

Crate mozjs_utf16_iter 

Source
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).

Modulesยง

cptrie ๐Ÿ”’
cptrie_indices ๐Ÿ”’
indices ๐Ÿ”’
report ๐Ÿ”’

Structsยง

ErrorReportingUtf16Chars
Iterator by Result<char,Utf16CharsError> over &[u16] that contains potentially-invalid UTF-16. There is exactly one Utf16CharsError per each unpaired surrogate.
Utf16CharIndices
An iterator over the chars and their positions.
Utf16CharIndicesWithTrie
An iterator over the chars and their positions.
Utf16Chars
Iterator by char over &[u16] that contains potentially-invalid UTF-16. See the crate documentation.
Utf16CharsError
A type for signaling UTF-16 errors.
Utf16CharsWithTrie
Iterator by char and icu_collections::codepointtrie::TrieValue over &[u16] that contains potentially-invalid UTF-16. See the crate documentation.

Traitsยง

Utf16CharsEx
Convenience trait that adds chars() and char_indices() methods similar to the ones on string slices to u16 slices.
Utf16CharsWithTrieEx
Convenience trait that adds chars_with_trie() and char_indices_with_trie() methods similar to the ones icu_collections::codepointtrie::CharsWithTrieEx adds to string slices to u16 slices.

Functionsยง

in_inclusive_range16 ๐Ÿ”’