utils: moving stringFoundInStringArray() from decoder into utils

This commit is contained in:
Viliam Mateicka
2008-12-09 17:36:10 +01:00
parent e61ba50ebd
commit 01c591fb84
3 changed files with 14 additions and 11 deletions

View File

@@ -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;
}