omni::str::matchWildcards

Defined in omni/str/Wildcard.h

inline const char *omni::str::matchWildcards(const char *str, const char *const *patterns, size_t patternsCount)

Attempts to match a string to a set of wildcard patterns.

Parameters
  • str[in] The string to attempt to match to the pattern pattern. This may not be nullptr.

  • patterns[in] An array of patterns to attempt to match the string str to. Each pattern in this array has the same format as the pattern in matchWildcard(). This may not be nullptr.

  • patternsCount[in] The total number of wildcard patterns in patterns.

Returns

The pattern that the test string str matched to if successful. Returns nullptr if the test string did not match any of the patterns.