+ *last = string_item_new();
+ (*last)->data = m_strdup(p->data);
+ last = &(*last)->next;
+ }
+
+ return res;
+}
+
+int string_list_contains(const string_list_t *t, const char *s, const char *any)
+{
+ while (t) {
+ if (!ascii_strncasecmp(s, t->data, m_strlen(t->data))
+ || (any && !ascii_strcasecmp(t->data, any)))
+ return 1;
+ t = t->next;