pub trait Utf16CharsEx {
// Required methods
fn chars(&self) -> Utf16Chars<'_> ⓘ;
fn char_indices(&self) -> Utf16CharIndices<'_> ⓘ;
}
Expand description
Convenience trait that adds chars()
and char_indices()
methods
similar to the ones on string slices to u16
slices.
Required Methods§
fn chars(&self) -> Utf16Chars<'_> ⓘ
fn char_indices(&self) -> Utf16CharIndices<'_> ⓘ
Implementations on Foreign Types§
Source§impl Utf16CharsEx for [u16]
impl Utf16CharsEx for [u16]
Source§fn chars(&self) -> Utf16Chars<'_> ⓘ
fn chars(&self) -> Utf16Chars<'_> ⓘ
Convenience method for creating an UTF-16 iterator for the slice.
Source§fn char_indices(&self) -> Utf16CharIndices<'_> ⓘ
fn char_indices(&self) -> Utf16CharIndices<'_> ⓘ
Convenience method for creating a code unit index and UTF-16 iterator for the slice.