omni::kit::Wildcard

Defined in omni/kit/Wildcard.h

class Wildcard

Defines the wildcard class.

Warning

This class uses std::regex which can be performance intensive. Consider using the functions in omni::str instead.

Public Functions

inline void setPatternString(const char *pattern)

Sets the wildcard string.

After this is set, call isMatching() to determine if a string matches the wildcard pattern.

Parameters

pattern – The wildcard pattern string to set.

inline bool isMatching(const char *str) const

Tests a string against the wildcard to see if they match.

Parameters

str – The string to be tested.

Return values
  • true – the string matches the wildcard

  • false – the string does not match the wildcard

inline void setCaseSensitive(bool sensitive)

Sets if the wildcard should be case sensitive.

The default is false (case insensitive).

Parameters

sensitivetrue if the wildcard should be case sensitive; false to be case insensitive