This function performs the kind of wildcard matching usually found in command-line tools for filename handling. Sometimes you need to do this kind of stuff yourself. Unfortunately, this kind of thing is not always provided by the operating system. For portability, then, this function should be used instead.
The function looks like this:
bool match_wildcard(const std::string& wild, const std::string& match);
The first argument is the wildcard expression and the second is the string to match against it. The function returns true (wow, surprise) if the match string does match the wild string.
The wildcard expression can contain any of the following:
Thus the wildcard expression "*.vhdl" matches any string ending in the sequence ".vhdl".