vyre 0.4.0

GPU compute intermediate representation with a standard operation library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use super::star_question_match;
use crate::ops::string_matching::search_contract::{
    validate_haystack, validate_needle, MatchError,
};

/// Return true when `input` matches a file-glob pattern.
///
/// `*` matches any byte sequence and `?` matches exactly one byte. Matching is
/// anchored to the full input.
///
/// # Errors
///
/// Returns `Fix: ...` when pattern or input exceeds the documented T47 cap.
pub fn glob_match(pattern: &[u8], input: &[u8]) -> Result<bool, MatchError> {
    validate_needle(pattern)?;
    validate_haystack(input)?;
    Ok(star_question_match(pattern, input))
}