mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-02-13 05:03:41 -05:00
20 lines
534 B
C++
20 lines
534 B
C++
#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;
|
|
}
|