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§