2026-01-31 22:01:57 +01:00
|
|
|
#include "stringlist.h"
|
|
|
|
|
|
2026-02-01 00:49:36 +01:00
|
|
|
static bool StringListUtil::containsAll(const QStringList &haystack, const QStringList &needles)
|
2026-01-31 22:01:57 +01:00
|
|
|
{
|
|
|
|
|
for (const auto &s : needles) {
|
|
|
|
|
if (!haystack.contains(s)) // optionally add Qt::CaseSensitivity
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-01 00:49:36 +01:00
|
|
|
static bool StringListUtil::containsAny(const QStringList &haystack, const QStringList &needles)
|
2026-01-31 22:01:57 +01:00
|
|
|
{
|
|
|
|
|
for (const auto &s : needles) {
|
|
|
|
|
if (haystack.contains(s)) // optionally add Qt::CaseSensitivity
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|