[][src]Function pmv::fnmatch

pub fn fnmatch(pattern: &str, name: &str) -> Option<Vec<String>>

Matches a file name with a pattern and returns matched parts.

Examples

use pmv::fnmatch;

assert_eq!(fnmatch("f*??r", "foobar"), Some(vec![
    String::from("oo"),
    String::from("b"),
    String::from("a"),
]));
assert_eq!(fnmatch("f*??r", "blah"), None);