git.samba.org
/
sfrench
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5aacc76
)
r7052: added a case insensitive str_list_check_ci() version of str_list_check()
author
Andrew Tridgell
<tridge@samba.org>
Sat, 28 May 2005 08:47:01 +0000
(08:47 +0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 18:17:09 +0000
(13:17 -0500)
(This used to be commit
5654330b6100a7291cee3631815cfb898100cf23
)
source4/lib/util_strlist.c
patch
|
blob
|
history
diff --git
a/source4/lib/util_strlist.c
b/source4/lib/util_strlist.c
index 3b949f6eef145f2f2e15909f09df8013cf83bc7a..d5c4d915850f345584b308c11d56c9a5a5d32d2e 100644
(file)
--- 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 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;
+}