]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/match.c
Add Doxygen @file documentation to each source and header file
[ngircd-alex.git] / src / ngircd / match.c
index 8f2fa2a60da60e2fb4a52b8a402e85c1aa7edd55..6c28938ef9bb4fc0dc19b3e8d82ed8dd7c3ffef7 100644 (file)
@@ -7,14 +7,15 @@
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
  * Please read the file COPYING, README and AUTHORS for more information.
- *
- * Wildcard pattern matching
  */
 
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: match.c,v 1.5 2006/10/06 21:23:47 fw Exp $";
+/**
+ * @file
+ * Wildcard pattern matching
+ */
 
 #include "imp.h"
 #include <assert.h>
@@ -22,6 +23,8 @@ static char UNUSED id[] = "$Id: match.c,v 1.5 2006/10/06 21:23:47 fw Exp $";
 
 #include "exp.h"
 #include "match.h"
+#include "defines.h"
+#include "tool.h"
 
 
 /*
@@ -53,6 +56,16 @@ Match( const char *Pattern, const char *String )
 } /* Match */
 
 
+GLOBAL bool
+MatchCaseInsensitive(const char *pattern, const char *searchme)
+{
+       char haystack[COMMAND_LEN];
+
+       strlcpy(haystack, searchme, sizeof(haystack));
+       return Match(pattern, ngt_LowerStr(haystack));
+} /* MatchCaseInsensitive */
+
+
 static int
 Matche( const char *p, const char *t )
 {