pub trait StrExt: Sealed {
// Required methods
fn to_lowercase_smolstr(&self) -> SmolStr;
fn to_uppercase_smolstr(&self) -> SmolStr;
fn to_ascii_lowercase_smolstr(&self) -> SmolStr;
fn to_ascii_uppercase_smolstr(&self) -> SmolStr;
fn replace_smolstr(&self, from: &str, to: &str) -> SmolStr;
fn replacen_smolstr(&self, from: &str, to: &str, count: usize) -> SmolStr;
}
Required Methods§
Sourcefn to_lowercase_smolstr(&self) -> SmolStr
fn to_lowercase_smolstr(&self) -> SmolStr
Returns the lowercase equivalent of this string slice as a new SmolStr
,
potentially without allocating.
See str::to_lowercase
.
Sourcefn to_uppercase_smolstr(&self) -> SmolStr
fn to_uppercase_smolstr(&self) -> SmolStr
Returns the uppercase equivalent of this string slice as a new SmolStr
,
potentially without allocating.
See str::to_uppercase
.
Sourcefn to_ascii_lowercase_smolstr(&self) -> SmolStr
fn to_ascii_lowercase_smolstr(&self) -> SmolStr
Returns the ASCII lowercase equivalent of this string slice as a new SmolStr
,
potentially without allocating.
Sourcefn to_ascii_uppercase_smolstr(&self) -> SmolStr
fn to_ascii_uppercase_smolstr(&self) -> SmolStr
Returns the ASCII uppercase equivalent of this string slice as a new SmolStr
,
potentially without allocating.
Sourcefn replace_smolstr(&self, from: &str, to: &str) -> SmolStr
fn replace_smolstr(&self, from: &str, to: &str) -> SmolStr
Replaces all matches of a &str with another &str returning a new SmolStr
,
potentially without allocating.
See str::replace
.
Sourcefn replacen_smolstr(&self, from: &str, to: &str, count: usize) -> SmolStr
fn replacen_smolstr(&self, from: &str, to: &str, count: usize) -> SmolStr
Replaces first N matches of a &str with another &str returning a new SmolStr
,
potentially without allocating.
See str::replacen
.