Symisc Systems

Libcox Command Reference


Star Follow @symisc

Command Syntax

fnmatch pattern filename [flags]


Alias

None


Description

Match filename (2nd arg, may not exist on disk) against a pattern (1st arg). (This implementation support most of the shell wildcard pattern).


Parameters

pattern

The shell wildcard pattern.

filename

The tested string.

flags

Optional parameter: A list of possible flags (must be numeric):
FNM_NOESCAPE: 1 Disable backslash escaping.
FNM_CASEFOLD: 8 Caseless match.
To combine the two options, pass 9 to this parameter
.


Return Value

Boolean: TRUE(1) if there is a match, FALSE(0) otherwise. Use libcox_value_to_bool() or libcox_value_to_int() to extract the processing result.