Expand description
§use-wildcard
Simple wildcard matching helpers for RustUse.
Warning: versions below
0.3.0are experimental and may change as the workspace matures.
§Example Usage
use use_wildcard::has_wildcard;
assert!(has_wildcard("report-*.txt"));§Scope
- lightweight
*and?matching helpers - conservative escaping and regex-string conversion
- predictable string-based behavior for fixtures and tooling
§Non-Goals
- full glob syntax
- filesystem matching
- regex engine implementation
- shell expansion
§License
Licensed under either of the following, at your option:
- MIT License
- Apache License, Version 2.0
Structs§
- Wildcard
Pattern - A simple wildcard pattern with optional case-sensitivity metadata.
Functions§
- ends_
with_ wildcard - Returns
truewhen the last unescaped token is a wildcard. - escape_
wildcard - Escapes wildcard metacharacters so they are treated literally.
- has_
wildcard - Returns
truewhen the input contains an unescaped*or?. - starts_
with_ wildcard - Returns
truewhen the first unescaped token is a wildcard. - wildcard_
matches - Returns
truewhen the pattern matches the entire input. - wildcard_
matches_ case_ insensitive - Returns
truewhen the pattern matches the entire input after lowercasing both sides. - wildcard_
to_ regex - Converts a wildcard pattern into an anchored regex string.