New function(s): strnmatch() and strmatch()

These two functions look for a string in a (terminate) list of strings
and returns the index to that string, or -1 if not found or error.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2018-06-29 18:38:56 +02:00
1 parent 9d63302337
commit b6a9ed3c6d
3 files changed
+93

No files matched your search

+3
View File
@@ -49,6 +49,9 @@
})
#endif
int strnmatch (const char *str, const char **list, size_t num);
int strmatch (const char *str, const char **list);
#ifndef strlcpy
size_t strlcpy (char *dst, const char *src, size_t siz);
#endif