matchWildcard#

Fully qualified name: omni::str::matchWildcard

Defined in omni/str/Wildcard.h

inline bool omni::str::matchWildcard(
carb::cpp::string_view str,
carb::cpp::string_view pattern,
) noexcept#

Checks if a string matches a wildcard pattern (string_view version).

Modern, efficient implementation using string_view for better performance and safety. Supports ‘?’ (match single character) and ‘*’ (match zero or more characters). Time complexity: O(n*m) worst case, where n = string length, m = pattern length.

Parameters:
  • str[in] The string to match against the pattern.

  • pattern[in] The wildcard pattern. May contain ‘?’ or ‘*’.

Returns:

true if the string matches the pattern, false otherwise.