gmatch - shell global pattern matching
cc [ flag ... ] file ... -lgen [ library ... ] #include <libgen.h> int gmatch(const char *str, const char *pattern);
gmatch() checks whether the null-terminated string str matches the null-terminated pattern string pattern. See the sh(1), section File Name Generation, for a discussion of pattern matching. A backslash (\) is used as an escape character in pattern strings.
gmatch() returns non-zero if the pattern matches the string, zero if the pattern does not.
Example 1 Examples of gmatch() function.
In the following example, gmatch() returns non-zero (true) for all strings with "a" or "-" as their last character.
char *s; gmatch (s, "*[a\-]" )
See attributes(5) for descriptions of the following attributes:
|
sh(1), attributes(5)
When compiling multithreaded applications, the _REENTRANT flag must be defined on the compile line. This flag should only be used in multithreaded applications.
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |