match static method
Match a pattern against a value.
Automatically detects the pattern type and delegates to the appropriate matching strategy.
Implementation
static bool match(String pattern, String value) {
if (pattern.isEmpty) return true;
// Explicit regex prefix
if (pattern.startsWith('regex:')) {
return _matchRegex(pattern.substring(6), value);
}
// Contains glob characters
if (pattern.contains('*') || pattern.contains('?')) {
return _matchGlob(pattern, value);
}
// Exact match
return pattern == value;
}