Trait string_patterns::PatternReplaceMany
source · pub trait PatternReplaceMany {
// Required methods
fn pattern_replace_pairs(&self, replacement_sets: &[(&str, &str)]) -> Self
where Self: Sized;
fn pattern_replace_pairs_ci(
&self,
replacement_sets: &[(&str, &str)]
) -> Self
where Self: Sized;
fn pattern_replace_sets(
&self,
replacement_sets: &[(&str, &str, bool)]
) -> Self
where Self: Sized;
}
Expand description
Provides methods to replace with multiple patterns expressed as arrays of tuples
Required Methods§
sourcefn pattern_replace_pairs(&self, replacement_sets: &[(&str, &str)]) -> Selfwhere
Self: Sized,
fn pattern_replace_pairs(&self, replacement_sets: &[(&str, &str)]) -> Selfwhere
Self: Sized,
Replaces multiple sets of patterns with replacements in case-sensitive mode with an array of tuples (pattern, replacement, case_insensitive)
sourcefn pattern_replace_pairs_ci(&self, replacement_sets: &[(&str, &str)]) -> Selfwhere
Self: Sized,
fn pattern_replace_pairs_ci(&self, replacement_sets: &[(&str, &str)]) -> Selfwhere
Self: Sized,
Replaces multiple sets of patterns with replacements in case-insensitive mode with an array of tuples (pattern, replacement, case_insensitive)
Implementations on Foreign Types§
source§impl PatternReplaceMany for String
impl PatternReplaceMany for String
source§fn pattern_replace_sets(
&self,
replacement_sets: &[(&str, &str, bool)]
) -> String
fn pattern_replace_sets( &self, replacement_sets: &[(&str, &str, bool)] ) -> String
Replaces multiple sets of patterns with replacements and boolean case sensitivity with an array of tuples (pattern, replacement, case_insensitive)