SYNOPSIS
#include <fnmatch.h>
int fnmatch(const char *pattern, const char *string, int flags);
DESCRIPTION
The
PARAMETERS
- pattern
-
Is the pattern to match.
- string
-
Is the string to match with pattern.
- flags
-
modifies the behavior of
fnmatch() . It is the bitwise-or of zero or more of the flags specified in <fnmatch.h>.If the FNM_PATHNAME flag is set, a slash character in string is explicitly matched by a slash in pattern; it is not matched by either the asterisk or question-mark special characters, or by a bracket expression. If the FNM_PATHNAME flag is not set, the slash character is treated as an ordinary character.
If FNM_NOESCAPE is not set, a backslash character (\) in pattern followed by any other character matches that second character in string. In particular, \\ matches a backslash in string. If FNM_NOESCAPE is set, a backslash character is treated as an ordinary character.
If FNM_PERIOD and FNM_PATHNAME are set, a leading period in string matches a period in pattern if it is the first character in string or if it immediately follows a slash.
If FNM_PERIOD is set and FNM_PATHNAME is not, a leading period in string matches a period in pattern only if it is the first character in string.
RETURN VALUES
If there is a match,
CONFORMANCE
POSIX.2
MULTITHREAD SAFETY LEVEL
PORTING ISSUES
None.
AVAILABILITY
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
- Functions:
glob()
PTC MKS Toolkit 10.4 Documentation Build 39.