int matchw(string pattern [flags])
Returns 1 if string matches pattern, or 0 if not.
Wildcard characters:
? maches any single character. Note that in Unicode mode it can be more than 1 byte because non ASCII characters consist of several bytes.
* matches 0 or more characters.
?* matches 1 or more characters.
** matches *.
*? matches ?.
See also: findrx, StrCompare.
str s="file.txt" if(matchw(s "*.txt")) ...