pub trait SimpleMatch {
// Required methods
fn starts_with_ci(&self, pattern: &str) -> bool;
fn starts_with_ci_alphanum(&self, pattern: &str) -> bool;
fn ends_with_ci(&self, pattern: &str) -> bool;
fn ends_with_ci_alphanum(&self, pattern: &str) -> bool;
fn contains_ci(&self, pattern: &str) -> bool;
fn contains_ci_alphanum(&self, pattern: &str) -> bool;
}
Expand description
Regex-free matcher methods for common use cases There are no plain and _cs-suffixed variants because the standard starts_with(pat: &str), contains(pat: &str) and ends_with(pat: &str) methods meet those needs
Required Methods§
Sourcefn starts_with_ci(&self, pattern: &str) -> bool
fn starts_with_ci(&self, pattern: &str) -> bool
Starts with a case-insensitive alphanumeric sequence
Sourcefn starts_with_ci_alphanum(&self, pattern: &str) -> bool
fn starts_with_ci_alphanum(&self, pattern: &str) -> bool
Starts with a case-insensitive alphanumeric sequence
Sourcefn ends_with_ci(&self, pattern: &str) -> bool
fn ends_with_ci(&self, pattern: &str) -> bool
Ends with a case-insensitive alphanumeric sequence
Sourcefn ends_with_ci_alphanum(&self, pattern: &str) -> bool
fn ends_with_ci_alphanum(&self, pattern: &str) -> bool
Ends with a case-insensitive alphanumeric sequence
Sourcefn contains_ci(&self, pattern: &str) -> bool
fn contains_ci(&self, pattern: &str) -> bool
Contains a case-insensitive alphanumeric sequence
Sourcefn contains_ci_alphanum(&self, pattern: &str) -> bool
fn contains_ci_alphanum(&self, pattern: &str) -> bool
Contains a case-insensitive alphanumeric sequence
Implementations on Foreign Types§
Source§impl SimpleMatch for str
impl SimpleMatch for str
Implementation for &str/String
Source§fn starts_with_ci(&self, pattern: &str) -> bool
fn starts_with_ci(&self, pattern: &str) -> bool
Starts with a case-insensitive sequence
Source§fn starts_with_ci_alphanum(&self, pattern: &str) -> bool
fn starts_with_ci_alphanum(&self, pattern: &str) -> bool
Starts with a case-insensitive alphanumeric sequence
Source§fn ends_with_ci(&self, pattern: &str) -> bool
fn ends_with_ci(&self, pattern: &str) -> bool
Ends with a case-insensitive sequence
Source§fn ends_with_ci_alphanum(&self, pattern: &str) -> bool
fn ends_with_ci_alphanum(&self, pattern: &str) -> bool
Ends with a case-insensitive alphanumeric sequence
Source§fn contains_ci(&self, pattern: &str) -> bool
fn contains_ci(&self, pattern: &str) -> bool
Contains a case-insensitive sequence
Source§fn contains_ci_alphanum(&self, pattern: &str) -> bool
fn contains_ci_alphanum(&self, pattern: &str) -> bool
Contains a case-insensitive alphanumeric sequence