Trait ilyvion_util::string_extensions::StrExtensions
source · pub trait StrExtensions {
// Required methods
fn to_ascii_lowercase_cow(&self) -> Cow<'_, str>;
fn is_ascii_lowercase(&self) -> bool;
}
Expand description
The trait responsible for adding methods to str
.
Required Methods§
sourcefn to_ascii_lowercase_cow(&self) -> Cow<'_, str>
fn to_ascii_lowercase_cow(&self) -> Cow<'_, str>
Works like str::to_ascii_lowercase
, but returns a Cow::Borrowed
when the original
already is ASCII and lowercase.
sourcefn is_ascii_lowercase(&self) -> bool
fn is_ascii_lowercase(&self) -> bool
Returns whether or not this str
is already ASCII lowercase.