sds: add new flb_sds_casecmp() api
@@ -87,6 +87,15 @@ static inline int flb_sds_cmp(flb_sds_t s, const char *str, int len)
return strncmp(s, str, len);
}
+static inline int flb_sds_casecmp(flb_sds_t s, const char *str, int len)
+{
+ if (flb_sds_len(s) != len) {
+ return -1;
+ }
+
+ return strncasecmp(s, str, len);
+}
+
flb_sds_t flb_sds_create(const char *str);
flb_sds_t flb_sds_create_len(const char *str, int len);
flb_sds_t flb_sds_create_size(size_t size);
