File name matching by wildcard. More...
#include <libppbase/base/Wildcard.h>
Public Member Functions | |
WildcardT () | |
Construct empty object. | |
WildcardT (const StringT< charT, traits > &wildcard) | |
Construct object with wildcard. | |
const StringT< charT, traits > & | get () const |
Gets wildcard pattern. | |
bool | match (const StringT< charT, traits > &filename, bool icase=BASE_ICASE) const |
Matches a file name against a pattern. | |
void | set (const StringT< charT, traits > &wildcard) |
Sets wildcard pattern. | |
Static Public Member Functions | |
static bool | match (const charT *wildcard, const charT *filename, bool icase=BASE_ICASE) |
Matches a file name against a pattern. |
File name matching by wildcard.
base::WildcardT< charT, traits >::WildcardT | ( | const StringT< charT, traits > & | wildcard | ) | [inline] |
Construct object with wildcard.
wildcard | given pattern |
const StringT<charT, traits>& base::WildcardT< charT, traits >::get | ( | ) | const [inline] |
Gets wildcard pattern.
bool base::WildcardT< charT, traits >::match | ( | const charT * | wildcard, | |
const charT * | filename, | |||
bool | icase = BASE_ICASE | |||
) | [static] |
Matches a file name against a pattern.
wildcard | given pattern | |
filename | given file name | |
icase | flag: ignore case |
Referenced by base::WildcardT< charT, traits >::match().
bool base::WildcardT< charT, traits >::match | ( | const StringT< charT, traits > & | filename, | |
bool | icase = BASE_ICASE | |||
) | const |
Matches a file name against a pattern.
filename | given file name | |
icase | flag: ignore case |
References base::StringT< charT, traits >::c_str(), and base::WildcardT< charT, traits >::match().
void base::WildcardT< charT, traits >::set | ( | const StringT< charT, traits > & | wildcard | ) | [inline] |
Sets wildcard pattern.
wildcard | given pattern |