pub trait MatchOccurrences {
// Required methods
fn find_matched_indices(&self, pat: &str) -> Vec<usize>;
fn find_char_indices(&self, pat: char) -> Vec<usize>;
}
Expand description
Return the indices of all ocurrences of a string
Required Methods§
Sourcefn find_matched_indices(&self, pat: &str) -> Vec<usize>
fn find_matched_indices(&self, pat: &str) -> Vec<usize>
Return the indices only of all matches of a given string pattern (not a regular expression) Builds on match_indices in the Rust standard library
Sourcefn find_char_indices(&self, pat: char) -> Vec<usize>
fn find_char_indices(&self, pat: char) -> Vec<usize>
Match occurrences of a single character