65 "The caller must guarantee only whitespace is passed.");
74 return number % 2 == 0;
107 const int len = input.
length();
112 int compressedChars = 0;
114 for(
int i = 0; i < len; ++i)
122 if(i + 1 == input.
length() || input.
at(i + 1) !=
c)
129 int wsLen = (i - start) + 1;
141 if(
isEven(compressedChars))
142 result +=
QChar(resultCP);
145 resultCP = resultCP << 8;
146 resultCP |= result.at(result.size() - 1).unicode();
147 result[result.size() - 1] = resultCP;
163 const int len = input.
length() * 2;
166 for(
int i = 0; i < len; ++i)
184 const int oldSize = retval.
size();
185 const int newSize = retval.
size() + wsLen;
189 for(
int f = oldSize; f < newSize; ++f)
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
#define QT_END_NAMESPACE
This macro expands to.
int length() const
Returns the number of characters referred to by the string reference.
const QChar at(int i) const
Returns the character at the given index position in the string.
ushort unicode() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
int length() const
Returns the number of characters in this string.
static quint8 toCompressedChar(const QChar ch, const int len)
The QString class provides a Unicode character string.
The QChar class provides a 16-bit Unicode character.
#define QT_BEGIN_NAMESPACE
This macro expands to.
int size() const
Returns the number of characters in this string.
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
static QString compress(const QStringRef &input)
Compresses input into a compressed format, returned as a QString.
The namespace for the internal API of QtXmlPatterns.
bool isEmpty() const
Returns true if the string reference has no characters; otherwise returns false.
The QStringRef class provides a thin wrapper around QString substrings.
void resize(int size)
Sets the size of the string to size characters.
static QChar toChar(const CharIdentifier id)
static bool isEven(const int number)
Returns true if number is an even number, otherwise false.
#define Q_ASSERT_X(cond, where, what)
static QString decompress(const QString &input)
Decompresses input into a usual QString.
static CharIdentifier toIdentifier(const QChar ch)
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
const QChar at(int i) const
Returns the character at the given index position in the string reference.