pub trait PatternMatchMany
where Self: PatternMatch,
{ // Provided methods fn pattern_match_many( &self, patterns: &[&str], case_insensitive: bool ) -> bool { ... } fn pattern_match_many_mixed(&self, pattern_sets: &[(&str, bool)]) -> bool { ... } fn pattern_match_many_conditional( &self, pattern_sets: &[(bool, &str, bool)] ) -> bool { ... } fn pattern_match_many_ci(&self, patterns: &[&str]) -> bool { ... } fn pattern_match_many_cs(&self, patterns: &[&str]) -> bool { ... } fn pattern_match_any( &self, patterns: &[&str], case_insensitive: bool ) -> bool { ... } fn pattern_match_any_ci(&self, patterns: &[&str]) -> bool { ... } fn pattern_match_any_cs(&self, patterns: &[&str]) -> bool { ... } fn pattern_match_any_mixed(&self, pattern_sets: &[(&str, bool)]) -> bool { ... } fn pattern_match_any_conditional( &self, pattern_sets: &[(bool, &str, bool)] ) -> bool { ... } }
Expand description

Provides methods to match with multiple patterns expressed as arrays of tuples or simple strs (for pattern_match_many_ci and pattern_match_many_cs)

Provided Methods§

source

fn pattern_match_many(&self, patterns: &[&str], case_insensitive: bool) -> bool

Matches all of the patterns in case-sensitivity flag with an array of tuples (patterns, case_insensitive)

source

fn pattern_match_many_mixed(&self, pattern_sets: &[(&str, bool)]) -> bool

Matches all of the patterns with case-insensitive flag e.g. (r#"a[ck]"#, true) “ac” or “ak” whether upper, lower or mixed case with an array of tuples (pattern, replacement, case_insensitive)

source

fn pattern_match_many_conditional( &self, pattern_sets: &[(bool, &str, bool)] ) -> bool

Matches all of the patterns with positivity condition and case-insensitive flag e.g. (false, "a[ck]", true) does not contain “ac” or “ak” whether upper, lower or mixed case with an array of tuples (positive, pattern, case_insensitive)

source

fn pattern_match_many_ci(&self, patterns: &[&str]) -> bool

Matches all of the patterns in case-insensitive mode with an array of str patterns

source

fn pattern_match_many_cs(&self, patterns: &[&str]) -> bool

Matches all of the patterns in case-sensitive mode with an array of str patterns

source

fn pattern_match_any(&self, patterns: &[&str], case_insensitive: bool) -> bool

Matches one or more of the patterns in case-sensitivity flag with an array of tuples (patterns, case_insensitive)

source

fn pattern_match_any_ci(&self, patterns: &[&str]) -> bool

Matches one or more of the patterns in case-insensitive mode with an array of str patterns

source

fn pattern_match_any_cs(&self, patterns: &[&str]) -> bool

Matches one or more of the patterns in case-sensitive mode with an array of str patterns

source

fn pattern_match_any_mixed(&self, pattern_sets: &[(&str, bool)]) -> bool

Matches one or more of the patterns with case-insensitive flag e.g. (r#"a[ck]"#, true) matches “ac” or “ak” whether upper, lower or mixed case with an array of tuples (pattern, replacement, case_insensitive)

source

fn pattern_match_any_conditional( &self, pattern_sets: &[(bool, &str, bool)] ) -> bool

Matches one or more of the patterns with positivity condition and case-insensitive flag

Implementations on Foreign Types§

source§

impl PatternMatchMany for str

Implement PatternMatchMany for &str/String

source§

impl PatternMatchMany for [String]

Implement PatternMatchMany for vectors of strings.

Implementors§