pub trait StrUtils {
// Required methods
fn contains_all<'a, I>(&self, parts: I) -> bool
where I: IntoIterator<Item = &'a str>;
fn contains_any<'a, I>(&self, parts: I) -> bool
where I: IntoIterator<Item = &'a str>;
fn to_title_case(&self) -> String;
}Expand description
Extra methods for string slices (&str).
Required Methods§
Sourcefn contains_all<'a, I>(&self, parts: I) -> boolwhere
I: IntoIterator<Item = &'a str>,
fn contains_all<'a, I>(&self, parts: I) -> boolwhere
I: IntoIterator<Item = &'a str>,
Returns true if all strings in the iterator exist in the main string.
Sourcefn contains_any<'a, I>(&self, parts: I) -> boolwhere
I: IntoIterator<Item = &'a str>,
fn contains_any<'a, I>(&self, parts: I) -> boolwhere
I: IntoIterator<Item = &'a str>,
Returns true if any of the strings in the iterator exist in the main string.
Sourcefn to_title_case(&self) -> String
fn to_title_case(&self) -> String
Returns a new string with the first letter capitalized.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.