You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

19 lines
534 B

#include "stringlist.h"
bool StringListUtil::containsAll(const QStringList &haystack, const QStringList &needles)
{
for (const auto &s : needles) {
if (!haystack.contains(s)) // optionally add Qt::CaseSensitivity
return false;
}
return true;
}
bool StringListUtil::containsAny(const QStringList &haystack, const QStringList &needles)
{
for (const auto &s : needles) {
if (haystack.contains(s)) // optionally add Qt::CaseSensitivity
return true;
}
return false;
}