utils: moving stringFoundInStringArray() from decoder into utils
This commit is contained in:
11
src/utils.c
11
src/utils.c
@@ -235,3 +235,14 @@ void xpthread_cond_destroy(pthread_cond_t *cond)
|
||||
if ((err = pthread_cond_destroy(cond)))
|
||||
FATAL("failed to destroy cond: %s\n", strerror(err));
|
||||
}
|
||||
|
||||
int stringFoundInStringArray(const char *const*array, const char *suffix)
|
||||
{
|
||||
while (array && *array) {
|
||||
if (strcasecmp(*array, suffix) == 0)
|
||||
return 1;
|
||||
array++;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user