]> git.ipfire.org Git - thirdparty/strongswan.git/blobdiff - src/libstrongswan/utils/lexparser.c
pki: Created pki --est man page
[thirdparty/strongswan.git] / src / libstrongswan / utils / lexparser.c
index 654a5b4b4c916f35e468c1da93bf34f831619952..fe94882f254c23682af1ed4780bd5e8c7b070f31 100644 (file)
@@ -36,6 +36,14 @@ bool match(const char *pattern, const chunk_t *ch)
        return ch->len == strlen(pattern) && strncmp(pattern, ch->ptr, ch->len) == 0;
 }
 
+/**
+ * compare string with chunk ignoring the case of the characters
+ */
+bool matchcase(const char *pattern, const chunk_t *ch)
+{
+       return ch->len == strlen(pattern) && strncasecmp(pattern, ch->ptr, ch->len) == 0;
+}
+
 /**
  * extracts a token ending with the first occurrence of a given termination symbol
  */