libite 2.6.1
|
#include <errno.h>
#include <string.h>
Go to the source code of this file.
Functions | |
int | strnmatch (const char *str, const char **list, size_t num) |
int | strmatch (const char *str, const char **list) |
int strmatch | ( | const char * | str, |
const char ** | list ) |
Finds matching strings from a list
str | String to look for. |
list | NUL terminated list of strings to search. |
This function searches the list
of strings for str
. If a (partial) match is found it returns the index in the list
.
Please note, the list
MUST be terminated by a NUL element. If that is not possible, we recommend using strnmatch() instead.
Definition at line 74 of file strmatch.c.
int strnmatch | ( | const char * | str, |
const char ** | list, | ||
size_t | num ) |
Finds matching strings from a finite list
str | String to look for |
list | List of strings to search. |
num | Number of entries in list . |
This function searches the list
of strings for str
. If a (partial) match is found it returns the index in the list
.
Very similar in function to strmatch(), but works for sets of strings that are not NUL
terminated.
Definition at line 43 of file strmatch.c.