pub trait Trim<'a> {
// Required methods
fn trim_cow(self) -> Cow<'a, str>;
fn trim_start_cow(self) -> Cow<'a, str>;
fn trim_end_cow(self) -> Cow<'a, str>;
fn trim_ascii_cow(self) -> Cow<'a, str>;
fn trim_ascii_start_cow(self) -> Cow<'a, str>;
fn trim_ascii_end_cow(self) -> Cow<'a, str>;
}Available on crate feature
alloc only.Expand description
To extend Cow<str> to have trim_cow, trim_start_cow, trim_end_cow, trim_ascii_cow, trim_ascii_start_cow, trim_ascii_end_cow methods.
Required Methods§
Sourcefn trim_cow(self) -> Cow<'a, str>
fn trim_cow(self) -> Cow<'a, str>
Trims both leading and trailing Unicode whitespace characters.
Sourcefn trim_start_cow(self) -> Cow<'a, str>
fn trim_start_cow(self) -> Cow<'a, str>
Trims leading (left) Unicode whitespace characters.
Sourcefn trim_end_cow(self) -> Cow<'a, str>
fn trim_end_cow(self) -> Cow<'a, str>
Trims trailing (right) Unicode whitespace characters.
Sourcefn trim_ascii_cow(self) -> Cow<'a, str>
fn trim_ascii_cow(self) -> Cow<'a, str>
Trims both leading and trailing ASCII whitespace characters.
Sourcefn trim_ascii_start_cow(self) -> Cow<'a, str>
fn trim_ascii_start_cow(self) -> Cow<'a, str>
Trims leading (left) ASCII whitespace characters.
Sourcefn trim_ascii_end_cow(self) -> Cow<'a, str>
fn trim_ascii_end_cow(self) -> Cow<'a, str>
Trims trailing (right) ASCII whitespace characters.