diff options
-rw-r--r-- | source4/lib/util_strlist.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source4/lib/util_strlist.c b/source4/lib/util_strlist.c index 3b949f6eef..d5c4d91585 100644 --- a/source4/lib/util_strlist.c +++ b/source4/lib/util_strlist.c @@ -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; +} |