Adding a iscontain

This commit is contained in:
AnonymusRaccoon
2020-02-27 13:32:30 +01:00
parent c9fe849454
commit 91f72ab506
+7
View File
@@ -39,3 +39,10 @@ bool xml_hasproperty(node *n, const char *key)
{ {
return (xml_gettempprop(n, key) != NULL); return (xml_gettempprop(n, key) != NULL);
} }
bool xml_propcontains(node *n, const char *key, const char *tofind)
{
char *tmp = xml_gettempprop(n, key);
return tmp && my_strstr(tmp, tofind);
}