98 static const QChar data[4] = { 0x0055, 0x006e, 0x10e3, 0x03a3 };
123 qDebug() <<
"Found character in range [a-f]";
133 if (
str ==
"auto" ||
str ==
"extern"
134 ||
str ==
"static" ||
str ==
"register") {
153 QString str =
"We must be <b>bold</b>, very <b>bold</b>";
157 qDebug() <<
"Found <b> tag at index position" <<
j;
250 str =
QString(
"Decimal 63 is %1 in hexadecimal")
315 while (!
data->isNull()) {
347 static const QChar unicode[] = {
348 0x005A, 0x007F, 0x00A4, 0x0060,
349 0x1009, 0x0020, 0x0020};
515 QString str =
"colour behaviour flavour neighbour";
606 QString csv =
"forename,middlename,surname,phone";
622 QString data =
"forename**middlename**surname**phone";
629 QString line =
"forename\tmiddlename surname \t \t phone";
669 str =
"Some text\n\twith strange whitespace.";
675 str =
"This time, a normal English sentence.";
681 str =
"Now: this sentence fragment.";
923int main(
int argc,
char *argv[])
The QApplication class manages the GUI application's control flow and main settings.
static int exec()
Enters the main event loop and waits until exit() is called, then returns the value that was set to e...
static void setDefault(const QLocale &locale)
\nonreentrant
QObject * parent() const
Returns a pointer to the parent object.
\inmodule QtCore \reentrant
\inmodule QtCore \reentrant
\macro QT_RESTRICTED_CAST_FROM_ASCII
QString & slice(qsizetype pos)
double toDouble(bool *ok=nullptr) const
Returns the string converted to a double value.
qsizetype indexOf(QLatin1StringView s, qsizetype from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
qsizetype lastIndexOf(QChar c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
int toInt(bool *ok=nullptr, int base=10) const
Returns the string converted to an int using base base, which is 10 by default and must be between 2 ...
bool startsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string starts with s; otherwise returns false.
QString & fill(QChar c, qsizetype size=-1)
Sets every character in the string to character ch.
QString & replace(qsizetype i, qsizetype len, QChar after)
QString sliced(qsizetype pos) const &
QString rightJustified(qsizetype width, QChar fill=u' ', bool trunc=false) const
Returns a string of size() width that contains the fill character followed by the string.
void chop(qsizetype n)
Removes n characters from the end of the string.
QStringList split(const QString &sep, Qt::SplitBehavior behavior=Qt::KeepEmptyParts, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Splits the string into substrings wherever sep occurs, and returns the list of those strings.
void truncate(qsizetype pos)
Truncates the string at the given position index.
bool isEmpty() const noexcept
Returns true if the string has no characters; otherwise returns false.
ushort toUShort(bool *ok=nullptr, int base=10) const
Returns the string converted to an {unsigned short} using base base, which is 10 by default and must ...
bool isNull() const
Returns true if this string is null; otherwise returns false.
qsizetype size() const noexcept
Returns the number of characters in this string.
uint toUInt(bool *ok=nullptr, int base=10) const
Returns the string converted to an {unsigned int} using base base, which is 10 by default and must be...
QString arg(qlonglong a, int fieldwidth=0, int base=10, QChar fillChar=u' ') const
SectionFlag
This enum specifies flags that can be used to affect various aspects of the section() function's beha...
QString section(QChar sep, qsizetype start, qsizetype end=-1, SectionFlags flags=SectionDefault) const
This function returns a section of the string.
static QString fromRawData(const QChar *, qsizetype size)
Constructs a QString that uses the first size Unicode characters in the array unicode.
QString first(qsizetype n) const &
qulonglong toULongLong(bool *ok=nullptr, int base=10) const
Returns the string converted to an {unsigned long long} using base base, which is 10 by default and m...
QString simplified() const &
QString leftJustified(qsizetype width, QChar fill=u' ', bool trunc=false) const
Returns a string of size width that contains this string padded by the fill character.
long toLong(bool *ok=nullptr, int base=10) const
Returns the string converted to a long using base base, which is 10 by default and must be between 2 ...
qlonglong toLongLong(bool *ok=nullptr, int base=10) const
Returns the string converted to a {long long} using base base, which is 10 by default and must be bet...
const QChar at(qsizetype i) const
Returns the character at the given index position in the string.
float toFloat(bool *ok=nullptr) const
Returns the string converted to a float value.
bool endsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string ends with s; otherwise returns false.
short toShort(bool *ok=nullptr, int base=10) const
Returns the string converted to a short using base base, which is 10 by default and must be between 2...
int compare(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
QString & insert(qsizetype i, QChar c)
QString toLower() const &
QChar * data()
Returns a pointer to the data stored in the QString.
qsizetype count(QChar c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
bool contains(QChar c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QString & append(QChar c)
QString trimmed() const &
QString & setNum(short, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
ulong toULong(bool *ok=nullptr, int base=10) const
Returns the string converted to an {unsigned long} using base base, which is 10 by default and must b...
QString & remove(qsizetype i, qsizetype len)
Removes n characters from the string, starting at the given position index, and returns a reference t...
QString last(qsizetype n) const &
QString & prepend(QChar c)
QString toUpper() const &
void resize(qsizetype size)
Sets the size of the string to size characters.
Q_CORE_EXPORT Q_DECL_PURE_FUNCTION int compareStrings(QStringView lhs, QStringView rhs, Qt::CaseSensitivity cs=Qt::CaseSensitive) noexcept
GLboolean GLboolean GLboolean b
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat z
GLint GLint GLint GLint GLint x
[0]
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLsizei const GLchar *const * path
static constexpr QChar sep
#define QStringLiteral(str)
static bool match(const uchar *found, uint foundLen, const char *target, uint targetLen)
unsigned long long quint64
QApplication app(argc, argv)
[0]