basic: add STRCASE_IN_SET() which is to STR_IN_SET() what strcaseeq() is to streq()
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
2d4f8cf467
commit
ddd6a22a0f
@@ -28,6 +28,18 @@ char *strv_find(char * const *l, const char *name) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
char *strv_find_case(char * const *l, const char *name) {
|
||||
char * const *i;
|
||||
|
||||
assert(name);
|
||||
|
||||
STRV_FOREACH(i, l)
|
||||
if (strcaseeq(*i, name))
|
||||
return *i;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
char *strv_find_prefix(char * const *l, const char *name) {
|
||||
char * const *i;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user