svn commit: samba r7052 - in branches/SAMBA_4_0/source/lib: .
tridge at samba.org
tridge at samba.org
Sat May 28 08:47:01 GMT 2005
Author: tridge
Date: 2005-05-28 08:47:01 +0000 (Sat, 28 May 2005)
New Revision: 7052
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7052
Log:
added a case insensitive str_list_check_ci() version of str_list_check()
Modified:
branches/SAMBA_4_0/source/lib/util_strlist.c
Changeset:
Modified: branches/SAMBA_4_0/source/lib/util_strlist.c
===================================================================
--- branches/SAMBA_4_0/source/lib/util_strlist.c 2005-05-28 07:41:20 UTC (rev 7051)
+++ branches/SAMBA_4_0/source/lib/util_strlist.c 2005-05-28 08:47:01 UTC (rev 7052)
@@ -173,3 +173,16 @@
}
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;
+}
More information about the samba-cvs
mailing list