diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-05-28 08:47:01 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:17:09 -0500 |
commit | 9dc94f8ab86d80735e4c8999bde1e2dd4f42476d (patch) | |
tree | 987ee8ebc2b0fbed7e239dd5727ce4dff1c84da9 /source4/lib | |
parent | 5aacc765e15a212af7bb97e35cd2340f7eafd2b1 (diff) | |
download | samba-9dc94f8ab86d80735e4c8999bde1e2dd4f42476d.tar.gz samba-9dc94f8ab86d80735e4c8999bde1e2dd4f42476d.tar.bz2 samba-9dc94f8ab86d80735e4c8999bde1e2dd4f42476d.zip |
r7052: added a case insensitive str_list_check_ci() version of str_list_check()
(This used to be commit 5654330b6100a7291cee3631815cfb898100cf23)
Diffstat (limited to 'source4/lib')
-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; +} |