utils: renamed stringFoundInStringArray()

No CamelCase.  Use bool instead of int.  Make both arguments
mandatory.
This commit is contained in:
Max Kellermann
2009-11-06 19:50:47 +01:00
parent ba34d48cf0
commit f9218423b9
6 changed files with 35 additions and 30 deletions

View File

@@ -20,6 +20,8 @@
#ifndef MPD_UTILS_H
#define MPD_UTILS_H
#include <stdbool.h>
#ifndef assert_static
/* Compile time assertion developed by Ralf Holly */
/* http://pera-software.com/articles/compile-time-assertions.pdf */
@@ -33,6 +35,15 @@ char *parsePath(char *path);
int set_nonblocking(int fd);
int stringFoundInStringArray(const char *const*array, const char *suffix);
/**
* Checks whether a string array contains the specified string.
*
* @param haystack a NULL terminated list of strings
* @param needle the string to search for; the comparison is
* case-insensitive for ASCII characters
* @return true if found
*/
bool
string_array_contains(const char *const* haystack, const char *needle);
#endif