#include "qplatformdefs.h"
#include "qurl.h"
#include "private/qurltlds_p.h"
#include "private/qtldurl_p.h"
#include "QtCore/qstringlist.h"
Go to the source code of this file.
◆ containsTLDEntry()
static bool containsTLDEntry |
( |
const QString & |
entry | ) |
|
|
static |
Definition at line 50 of file qtldurl.cpp.
Referenced by qIsEffectiveTLD().
54 while (currentDomainIndex <
tldIndices[index+1]) {
56 if (currentEntry == entry)
The QString class provides a Unicode character string.
static const quint16 tldIndices[]
static QString fromUtf8(const char *, int size=-1)
Returns a QString initialized with the first size bytes of the UTF-8 string str.
static const quint16 tldCount
static const char tldData[]
uint qHash(const QUrl &url)
uint qstrlen(const char *str)
◆ qIsEffectiveTLD()
Return true if domain is a top-level-domain per Qt's copy of the Mozilla public suffix list.
- Warning
- This function is not part of the public interface.
Definition at line 97 of file qtldurl.cpp.
Referenced by qTopLevelDomain(), and QNetworkCookieJar::setCookiesFromUrl().
107 wildCardDomain.
reserve(count + 1);
116 exceptionDomain.
append(domain);
QBool contains(QChar c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
static bool containsTLDEntry(const QString &entry)
The QString class provides a Unicode character string.
void reserve(int size)
Attempts to allocate memory for at least size characters.
int size() const
Returns the number of characters in this string.
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.
QString & append(QChar c)
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
◆ qTopLevelDomain()
Return the top-level-domain per Qt's copy of the Mozilla public suffix list of domain.
- Warning
- This function is not part of the public interface.
Definition at line 73 of file qtldurl.cpp.
Referenced by QUrl::topLevelDomain().
80 for (
int j = sections.
count() - 1; j >= 0; --j) {
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.
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
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.
QString right(int n) const Q_REQUIRED_RESULT
Returns a substring that contains the n rightmost characters of the string.
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.