Struct litepattern::LPattern
[−]
[src]
pub struct LPattern { /* fields omitted */ }
Methods
impl LPattern
[src]
fn new(pattern: &str) -> LPattern
fn apply_to(&self, text: &str) -> Vec<String>
Apply the created pattern to some text. E.g. 2010-10-10
text
- Text to apply pattern to.
Return value:
Vector of pattern matched strings.
fn is_match(&self, captures: Vec<String>, text: &str) -> bool
Determine if the pattern matches from the capture results and text.
captures
- Captures returned from apply_to method.text
- Text to apply pattern to.
Return value:
Did the pattern match against capture results and text?