1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

r7052: added a case insensitive str_list_check_ci() version of str_list_check()

(This used to be commit 5654330b61)
This commit is contained in:
Andrew Tridgell 2005-05-28 08:47:01 +00:00 committed by Gerald (Jerry) Carter
parent 5aacc765e1
commit 9dc94f8ab8

View File

@ -173,3 +173,16 @@ BOOL str_list_check(const char **list, const char *s)
}
return False;
}
/*
return True if a string is in a list, case insensitively
*/
BOOL str_list_check_ci(const char **list, const char *s)
{
int i;
for (i=0;list[i];i++) {
if (strcasecmp(list[i], s) == 0) return True;
}
return False;
}