42 #include "qplatformdefs.h" 44 #include "private/qurltlds_p.h" 45 #include "private/qtldurl_p.h" 46 #include "QtCore/qstringlist.h" 54 while (currentDomainIndex <
tldIndices[index+1]) {
56 if (currentEntry == entry)
80 for (
int j = sections.
count() - 1; j >= 0; --j) {
107 wildCardDomain.
reserve(count + 1);
116 exceptionDomain.
append(domain);
QBool contains(QChar c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
#define QT_END_NAMESPACE
This macro expands to.
static bool containsTLDEntry(const QString &entry)
QString & prepend(QChar c)
int count(const T &t) const
Returns the number of occurrences of value in the list.
The QString class provides a Unicode character string.
Q_CORE_EXPORT QString qTopLevelDomain(const QString &domain)
Return the top-level-domain per Qt's copy of the Mozilla public suffix list of domain.
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
static const quint16 tldIndices[]
void reserve(int size)
Attempts to allocate memory for at least size characters.
#define QT_BEGIN_NAMESPACE
This macro expands to.
int size() const
Returns the number of characters in this string.
const T & at(int i) const
Returns the item at index position i in the list.
The QStringList class provides a list of strings.
static QString fromUtf8(const char *, int size=-1)
Returns a QString initialized with the first size bytes of the UTF-8 string str.
int indexOf(QChar c, int from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
QString right(int n) const Q_REQUIRED_RESULT
Returns a substring that contains the n rightmost characters of the string.
static const quint16 tldCount
static const char tldData[]
uint qHash(const QUrl &url)
QString & append(QChar c)
uint qstrlen(const char *str)
QString toLower() const Q_REQUIRED_RESULT
Returns a lowercase copy of the string.
Q_CORE_EXPORT bool qIsEffectiveTLD(const QString &domain)
Return true if domain is a top-level-domain per Qt's copy of the Mozilla public suffix list...
QStringList split(const QString &sep, SplitBehavior behavior=KeepEmptyParts, Qt::CaseSensitivity cs=Qt::CaseSensitive) const Q_REQUIRED_RESULT
Splits the string into substrings wherever sep occurs, and returns the list of those strings...
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.