mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-12 23:35:33 +08:00
Ref T660, utility functions
This commit is contained in:
@@ -454,6 +454,16 @@ namespace BlackMisc
|
||||
return candidate;
|
||||
}
|
||||
|
||||
bool containsAny(const QString &testString, const QStringList &any, Qt::CaseSensitivity cs)
|
||||
{
|
||||
if (testString.isEmpty() || any.isEmpty()) { return false; }
|
||||
for (const QString &a : any)
|
||||
{
|
||||
if (testString.contains(a, cs)) { return true; }
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
} // ns
|
||||
|
||||
//! \endcond
|
||||
|
||||
Reference in New Issue
Block a user