Skip to main content

glob_matches

Function glob_matches 

Source
pub fn glob_matches(pattern: &str, input: &str) -> bool
Expand description

Returns true when the glob pattern matches the full input string.

Examples found in repository?
examples/facade_full.rs (line 8)
3fn main() {
4    let span = matchers::MatchSpan { start: 0, end: 4 };
5
6    assert_eq!(matchers::slice_match("rustacean", &span), Some("rust"));
7    assert!(regex::has_regex_match(r"\d+", "v2"));
8    assert!(glob::glob_matches("src/**/*.rs", "src/bin/main.rs"));
9    assert!(wildcard::wildcard_matches("data-*.json", "data-1.json"));
10}