Adding a iscontain

This commit is contained in:
AnonymusRaccoon
2020-02-27 13:32:30 +01:00
parent c9fe849454
commit 91f72ab506
+7
View File
@@ -38,4 +38,11 @@ int xml_getbinaprop(node *n, const char *key)
bool xml_hasproperty(node *n, const char *key)
{
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);
}