46 #define QT_NO_ASCII_CAST 120 DirL, DirR, DirEN, DirES, DirET, DirAN, DirCS, DirB, DirS,
DirWS, DirON,
121 DirLRE, DirLRO, DirAL, DirRLE,
DirRLO, DirPDF, DirNSM, DirBN
126 Single, Canonical, Font, NoBreak, Initial, Medial,
128 Wide, Narrow, Small, Square, Compat, Fraction
138 int digitValue()
const;
145 bool mirrored()
const;
146 QChar mirroredChar()
const;
152 #ifndef QT_NO_CAST_ASCII 154 operator char()
const {
return latin1(); }
157 bool isNull()
const {
return unicode()==0; }
158 bool isPrint()
const;
159 bool isPunct()
const;
160 bool isSpace()
const;
162 bool isLetter()
const;
163 bool isNumber()
const;
164 bool isLetterOrNumber()
const;
165 bool isDigit()
const;
185 #if defined(_WS_X11_) || defined(_OS_WIN32_BYTESWAP_) || defined( _WS_QWS_ ) 190 #if defined(QT_QSTRING_UCS_4) 193 enum { net_ordered = 1 };
198 #if defined(QT_QSTRING_UCS_4) 201 enum { net_ordered = 0 };
208 #ifdef QT_QSTRING_UCS_4 215 #ifdef QT_QSTRING_UCS_4 222 #ifdef QT_QSTRING_UCS_4 229 #ifdef QT_QSTRING_UCS_4 236 #ifdef QT_QSTRING_UCS_4 243 #ifdef QT_QSTRING_UCS_4 250 #ifdef QT_QSTRING_UCS_4 257 #ifdef QT_QSTRING_UCS_4 264 #ifdef QT_QSTRING_UCS_4 272 return ch == c.
cl && !c.
rw;
277 return ch == c.
cl && !c.
rw;
282 return c1.
cl == c2.
cl 288 return c1.
cl != c2.
cl 294 return ch != c.
cl || c.
rw;
299 return ch != c.
cl || c.
rw;
304 return !(ch < c.
cl || c.
rw);
309 return ch <= c.
cl || c.
rw;
334 unicode(0), ascii(0), len(0), maxl(0), dirtyascii(0) {
ref(); }
336 unicode(u), ascii(0), len(l), maxl(m), dirtyascii(0) { }
339 if ( ascii )
delete[] ascii; }
359 #ifndef QT_NO_CAST_ASCII 365 #ifndef QT_NO_CAST_ASCII 366 QString &operator=(
const char * );
379 inline bool isNull()
const {
return d == shared_null; }
381 bool isEmpty()
const;
385 #if QT_VERSION >= 300 386 #error "fill() Should return *this, or QChar constructor should take count=1" 392 QString arg(
long a,
int fieldwidth=0,
int base=10)
const;
394 QString arg(
int a,
int fieldwidth=0,
int base=10)
const;
396 QString arg(
short a,
int fieldwidth=0,
int base=10)
const;
398 QString arg(
char a,
int fieldwidth=0)
const;
401 QString arg(
double a,
int fieldwidth=0,
char fmt=
'g',
int prec=-1)
const;
404 #if defined(_CC_GNU_) && !defined(__INSURE__) 405 __attribute__ ((format (printf, 2, 3)))
410 int find(
char c,
int index=0,
bool cs=
TRUE )
const;
413 #ifndef QT_NO_CAST_ASCII 414 int find(
const char* str,
int index=0 )
const;
417 int findRev(
char c,
int index=-1,
bool cs=
TRUE)
const;
420 #ifndef QT_NO_CAST_ASCII 421 int findRev(
const char* str,
int index=-1 )
const;
425 {
return contains(
QChar(c),
cs); }
426 #ifndef QT_NO_CAST_ASCII 427 int contains(
const char* str,
bool cs=
TRUE )
const;
430 int contains(
const QRegExp & )
const;
442 QString stripWhiteSpace()
const;
443 QString simplifyWhiteSpace()
const;
460 short toShort(
bool *ok=0,
int base=10 )
const;
461 ushort toUShort(
bool *ok=0,
int base=10 )
const;
462 int toInt(
bool *ok=0,
int base=10 )
const;
463 uint toUInt(
bool *ok=0,
int base=10 )
const;
464 long toLong(
bool *ok=0,
int base=10 )
const;
465 ulong toULong(
bool *ok=0,
int base=10 )
const;
466 uint64 toUInt64(
bool *ok=0,
int base=10 )
const;
467 float toFloat(
bool *ok=0 )
const;
468 double toDouble(
bool *ok=0 )
const;
476 QString &setNum(
float,
char f=
'g',
int prec=6 );
477 QString &setNum(
double,
char f=
'g',
int prec=6 );
483 static QString number(
double,
char f=
'g',
int prec=6 );
502 if (
d->count!=1 || i>=
d->len)
505 return d->unicode[i];
509 const char* ascii()
const;
510 const char* latin1()
const;
511 static QString fromLatin1(
const char*,
int len=-1);
512 const unsigned short *ucs2()
const;
513 static QString fromUcs2(
const unsigned short *ucs2 );
514 #ifndef QT_NO_TEXTCODEC 516 static QString fromUtf8(
const char*,
int len=-1);
519 static QString fromLocal8Bit(
const char*,
int len=-1);
521 #ifndef QT_NO_ASCII_CAST 522 operator const char *()
const {
return latin1(); }
527 QString &setLatin1(
const char*,
int len=-1 );
533 #ifndef QT_NO_DATASTREAM 539 QString visual(
int index = 0,
int len = -1);
542 const char*
data()
const {
return latin1(); }
545 bool startsWith(
const QString& )
const;
552 void setLength(
uint pos );
554 bool findArg(
int& pos,
int& len)
const;
558 static char* unicodeToAscii(
const QChar*,
uint len );
638 #ifndef QT_NO_DATASTREAM 653 d(shared_null ? shared_null : makeSharedNull())
707 {
return setNum((
long)n, base); }
713 {
return setNum((
long)n, base); }
719 {
return setNum((
double)n,f,prec); }
722 {
return arg((
long)a, fieldwidth, base); }
725 {
return arg((
ulong)a, fieldwidth, base); }
728 {
return arg((
long)a, fieldwidth, base); }
731 {
return arg((
ulong)a, fieldwidth, base); }
740 #ifndef QT_NO_CAST_ASCII 759 #ifndef QT_NO_CAST_ASCII 781 #ifndef QT_NO_CAST_ASCII 827 #if defined(_OS_WIN32_)
A QString which uses constant Unicode data.
const QChar * unicode() const
Direction direction() const
The QRegExp class provides pattern matching using regular expressions or wildcards.
DoubleProduct & operator+=(DoubleProduct &left, DoubleProduct const &right)
int compare(unsigned *r, sha1::digest_t const &d)
QString & insert(uint index, char c)
std::enable_if_t< is_selector< A >, NotHelper< A > > operator!(A const &a)
static bool format(QChar::Decomposition tag, QString &str, int index, int len)
QChar operator[](int i) const
QCharRef operator=(uint rc)
bool operator<(const QString &s1, const char *s2)
The QString class provides an abstraction of Unicode text and the classic C null-terminated char arra...
int operator!=(QChar c1, QChar c2)
bool operator>=(const QString &s1, const char *s2)
static QString fromLatin1(const char *, int len=-1)
The QChar class provides a light-weight Unicode character.
Category category() const
Decomposition decompositionTag() const
QString(QStringData *dd, bool)
QChar constref(uint i) const
int compare(const QString &s) const
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
bool operator<=(const QString &s1, const char *s2)
QString arg(long a, int fieldwidth=0, int base=10) const
const char * data() const
bool isLetterOrNumber() const
int operator<=(QChar c, char ch)
QString & operator=(const Null &)
QString & setNum(short, int base=10)
QString & operator+=(const QString &str)
static bool networkOrdered()
QString decomposition() const
QCharRef operator=(char c)
QCharRef operator=(short rc)
static constexpr double mb
QChar mirroredChar() const
QT_STATIC_CONST QChar replacement
QString operator+(const QString &s1, const QString &s2)
QChar::Joining joining() const
QCharRef operator=(QChar c)
QT_STATIC_CONST QChar byteOrderMark
QCharRef operator=(const QCharRef &c)
QString & operator=(const QString &)
int findRev(QChar c, int index=-1, bool cs=TRUE) const
Q_EXPORT QDataStream & operator>>(QDataStream &, QString &)
QChar mirroredChar() const
QStringData(QChar *u, uint l, uint m)
Q_EXPORT QDataStream & operator<<(QDataStream &, const QString &)
QCharRef operator=(int rc)
bool operator>(const QString &s1, const char *s2)
int operator<(QChar c, char ch)
bool operator==(const QString &s1, const QString &s2)
The QCharRef class is a helper class for QString.
int find(QChar c, int index=0, bool cs=TRUE) const
QT_STATIC_CONST QChar byteOrderSwapped
QT_STATIC_CONST QChar nbsp
int operator==(char ch, QChar c)
QChar::Decomposition decompositionTag() const
QCharRef operator=(uchar c)
QT_STATIC_CONST QChar null
int contains(char c, bool cs=TRUE) const
cet::LibraryManager dummy("noplugin")
QCharRef(QString *str, uint pos)
The QShared struct is internally used for implementing shared classes.
bool operator!=(const QString &s1, const QString &s2)
QCharRef operator=(ushort rc)
The QDataStream class provides serialization of binary data to a QIODevice.
int operator>=(QChar c, char ch)
QString decomposition() const
unsigned long long uint64
const QString & string() const
static int compare(const QString &s1, const QString &s2)
QChar::Category category() const
QString & insert(uint index, const QString &)
int operator>(QChar c, char ch)
QChar::Direction direction() const
static QStringData * shared_null