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
*/