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