matchWildcards#
Fully qualified name: omni::str::matchWildcards
Defined in omni/str/Wildcard.h
- inline carb::cpp::optional<carb::cpp::string_view> omni::str::matchWildcards(
- carb::cpp::string_view str,
- carb::cpp::span<const carb::cpp::string_view> patterns,
Matches a string against multiple wildcard patterns.
See also
matchWildcard() for single pattern matching.
Note
This function tests each pattern in order and returns the first match found.
- Parameters:
str – [in] The string to match against the patterns.
patterns – [in] A span of wildcard patterns to test against the string. Each pattern may contain ‘*’ (matches zero or more characters) and ‘?’ (matches exactly one character) wildcards.
- Returns:
An optional containing the first pattern that matches the string, or nullopt if no pattern matches.