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
.