Ref T242, utility functions for matching

* search among airline aircraft
* improved logging information
* search among airline ICAO aircraft (which aircraft does the airline use?)
* check ecosystem before merging with VATSIM data
This commit is contained in:
Klaus Basan
2018-02-07 05:21:41 +01:00
parent 10f942e702
commit e001b0338f
14 changed files with 231 additions and 27 deletions

View File

@@ -12,6 +12,7 @@
#include "stringutils.h"
#include <QChar>
#include <QTextCodec>
#include <QStringBuilder>
#include <QRegularExpression>
namespace BlackMisc
@@ -322,6 +323,14 @@ namespace BlackMisc
if (cs == Qt::CaseSensitive) { return c1 == c2; }
return caseInsensitiveStringCompare(c1, c2);
}
const QString inApostrophes(const QString &in, bool ignoreEmpty)
{
static const QString e;
static const QString ea("''");
if (in.isEmpty()) { return ignoreEmpty ? e : ea; }
return QStringLiteral("'") % in % QStringLiteral("'");
}
}
//! \endcond