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§
Sourcefn utf16chars(&self) -> Utf16Chars<'_> ⓘ
fn utf16chars(&self) -> Utf16Chars<'_> ⓘ
Equivalent to .chars()
but produces Utf16Char
s.
Sourcefn utf8char_indices(&self) -> Utf8CharIndices<'_> ⓘ
fn utf8char_indices(&self) -> Utf8CharIndices<'_> ⓘ
Equivalent to .char_indices()
but produces Utf8Char
s.
Sourcefn utf16char_indices(&self) -> Utf16CharIndices<'_> ⓘ
fn utf16char_indices(&self) -> Utf16CharIndices<'_> ⓘ
Equivalent to .char_indices()
but produces Utf16Char
s.