utf8_iter

Trait Utf8CharsEx

Source
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§

Implementations on Foreign Types§

Source§

impl Utf8CharsEx for [u8]

Source§

fn chars(&self) -> Utf8Chars<'_>

Convenience method for creating an UTF-8 iterator for the slice.

Source§

fn char_indices(&self) -> Utf8CharIndices<'_>

Convenience method for creating a byte index and UTF-8 iterator for the slice.

Implementors§