pub trait MatchWord {
    // Required methods
    fn match_word_bounds(
        &self,
        word: &str,
        bounds: WordBounds,
        case_insensitive: bool
    ) -> bool;
    fn match_word(&self, word: &str, case_insensitive: bool) -> bool;
    fn match_word_start(&self, word: &str, case_insensitive: bool) -> bool;
    fn match_word_end(&self, word: &str, case_insensitive: bool) -> bool;
    fn match_word_ci(&self, word: &str) -> bool;
    fn match_word_start_ci(&self, word: &str) -> bool;
    fn match_word_end_ci(&self, word: &str) -> bool;
    fn match_word_cs(&self, word: &str) -> bool;
    fn match_word_start_cs(&self, word: &str) -> bool;
    fn match_word_end_cs(&self, word: &str) -> bool;
    fn match_words_by_proximity(
        &self,
        first: &str,
        second: &str,
        min: i16,
        max: i16,
        case_insensitive: bool
    ) -> bool;
}

Required Methods§

source

fn match_word_bounds( &self, word: &str, bounds: WordBounds, case_insensitive: bool ) -> bool

Match a word with bounds options and case_insensitive flag

source

fn match_word(&self, word: &str, case_insensitive: bool) -> bool

Match a whole word with a case_insensitive flag

source

fn match_word_start(&self, word: &str, case_insensitive: bool) -> bool

Match from the start of a word with a case_insensitive flag

source

fn match_word_end(&self, word: &str, case_insensitive: bool) -> bool

Match to the end of a word with a case_insensitive flag

source

fn match_word_ci(&self, word: &str) -> bool

Match a whole word in case-insensitive mode

source

fn match_word_start_ci(&self, word: &str) -> bool

Match from the start of a word in case-insensitive mode

source

fn match_word_end_ci(&self, word: &str) -> bool

Match to the end of a word in case-insensitive mode

source

fn match_word_cs(&self, word: &str) -> bool

Match a whole word in case-sensitive mode

source

fn match_word_start_cs(&self, word: &str) -> bool

Match from the start of a word in case-sensitive mode

source

fn match_word_end_cs(&self, word: &str) -> bool

Match to the end of a word in case-sensitive mode

source

fn match_words_by_proximity( &self, first: &str, second: &str, min: i16, max: i16, case_insensitive: bool ) -> bool

Match a word pair by min and max proximity, where a negative min value implies before the end of the first word

Implementations on Foreign Types§

source§

impl MatchWord for str

source§

fn match_word_bounds( &self, word: &str, bounds: WordBounds, case_insensitive: bool ) -> bool

Match a word with bounds options and case_insensitive flag

source§

fn match_word(&self, word: &str, case_insensitive: bool) -> bool

Case-conditional match of a whole word To match only the start or end, use the start and end methods or expand the pattern with \w* at either end

source§

fn match_word_start(&self, word: &str, case_insensitive: bool) -> bool

Case-conditional match from the start of a word boundary

source§

fn match_word_end(&self, word: &str, case_insensitive: bool) -> bool

Case-conditional match to the end of a word boundary

source§

fn match_word_ci(&self, word: &str) -> bool

Case-insensitive whole word match, for words with optional hyphens use -?, e.g. hip-?hop matches hip-hop and hiphop, but not hip-hopping To match only the start or end, use the start and end methods or expand the pattern with \w* at either end

source§

fn match_word_start_ci(&self, word: &str) -> bool

Case-insensitive match from the start of a word boundary

source§

fn match_word_end_ci(&self, word: &str) -> bool

Case-insensitive match to the end of a word boundary

source§

fn match_word_cs(&self, word: &str) -> bool

Case-sensitive whole word match, for words with optional hyphens use -?, e.g. hip-?hop matches hip-hop and hiphop, but not hip-hopping To match only the start or end, use the start and end methods or expand the pattern with \w* at either end

source§

fn match_word_start_cs(&self, word: &str) -> bool

Case-sensitive match from the start of a word boundary

source§

fn match_word_end_cs(&self, word: &str) -> bool

Case-sensitive match to the end of a word boundary

source§

fn match_words_by_proximity( &self, first: &str, second: &str, min: i16, max: i16, case_insensitive: bool ) -> bool

Check if whole word patterns occur in close proximity as defined by their min and max values If the second word may occur before the first the min value should negative The distance between the end of the first and start of the second word is measured

Implementors§