Create a glob-pattern matcher
dotenvx_primitives::r#match
Usage
Use the Rust raw identifier r#match. The returned matcher supports * and ? and excludes ignored patterns.
use dotenvx_primitives::r#match;
let is_allowed = r#match(&["DOTENV_*"], &["DOTENV_PRIVATE_*"]);
assert!(is_allowed("DOTENV_PUBLIC_KEY"));
assert!(!is_allowed("DOTENV_PRIVATE_KEY"));