pub trait StrExt: AsRef<str> {
    // Required methods
    fn utf8chars(&self) -> Utf8Chars<'_> ;
    fn utf16chars(&self) -> Utf16Chars<'_> ;
    fn utf8char_indices(&self) -> Utf8CharIndices<'_> ;
    fn utf16char_indices(&self) -> Utf16CharIndices<'_> ;
}
Expand description

Adds .utf8chars() and .utf16chars() iterator constructors to &str.

Required Methods§

source

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

Equivalent to .chars() but produces Utf8Chars.

source

fn utf16chars(&self) -> Utf16Chars<'_>

Equivalent to .chars() but produces Utf16Chars.

source

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

Equivalent to .char_indices() but produces Utf8Chars.

source

fn utf16char_indices(&self) -> Utf16CharIndices<'_>

Equivalent to .char_indices() but produces Utf16Chars.

Implementations on Foreign Types§

source§

impl StrExt for str

Implementors§