Classes | Macros | Functions
qstring.h File Reference
#include "qcstring.h"

Go to the source code of this file.

Classes

class  QChar
 The QChar class provides a light-weight Unicode character. More...
 
struct  QStringData
 
class  QString
 The QString class provides an abstraction of Unicode text and the classic C null-terminated char array (char*). More...
 
struct  QString::Null
 
class  QCharRef
 The QCharRef class is a helper class for QString. More...
 
class  QConstString
 A QString which uses constant Unicode data. More...
 

Macros

#define QT_NO_ASCII_CAST
 

Functions

int operator== (char ch, QChar c)
 
int operator== (QChar c, char ch)
 
int operator== (QChar c1, QChar c2)
 
int operator!= (QChar c1, QChar c2)
 
int operator!= (char ch, QChar c)
 
int operator!= (QChar c, char ch)
 
int operator<= (QChar c, char ch)
 
int operator<= (char ch, QChar c)
 
int operator<= (QChar c1, QChar c2)
 
int operator>= (QChar c, char ch)
 
int operator>= (char ch, QChar c)
 
int operator>= (QChar c1, QChar c2)
 
int operator< (QChar c, char ch)
 
int operator< (char ch, QChar c)
 
int operator< (QChar c1, QChar c2)
 
int operator> (QChar c, char ch)
 
int operator> (char ch, QChar c)
 
int operator> (QChar c1, QChar c2)
 
Q_EXPORT QDataStreamoperator<< (QDataStream &, const QString &)
 
Q_EXPORT QDataStreamoperator>> (QDataStream &, QString &)
 
Q_EXPORT bool operator!= (const QString &s1, const QString &s2)
 
Q_EXPORT bool operator< (const QString &s1, const QString &s2)
 
Q_EXPORT bool operator<= (const QString &s1, const QString &s2)
 
Q_EXPORT bool operator== (const QString &s1, const QString &s2)
 
Q_EXPORT bool operator> (const QString &s1, const QString &s2)
 
Q_EXPORT bool operator>= (const QString &s1, const QString &s2)
 
Q_EXPORT bool operator!= (const QString &s1, const char *s2)
 
Q_EXPORT bool operator< (const QString &s1, const char *s2)
 
Q_EXPORT bool operator<= (const QString &s1, const char *s2)
 
Q_EXPORT bool operator== (const QString &s1, const char *s2)
 
Q_EXPORT bool operator> (const QString &s1, const char *s2)
 
Q_EXPORT bool operator>= (const QString &s1, const char *s2)
 
Q_EXPORT bool operator!= (const char *s1, const QString &s2)
 
Q_EXPORT bool operator< (const char *s1, const QString &s2)
 
Q_EXPORT bool operator<= (const char *s1, const QString &s2)
 
Q_EXPORT bool operator== (const char *s1, const QString &s2)
 
Q_EXPORT bool operator>= (const char *s1, const QString &s2)
 
Q_EXPORT QString operator+ (const QString &s1, const QString &s2)
 
Q_EXPORT QString operator+ (const QString &s1, const char *s2)
 
Q_EXPORT QString operator+ (const char *s1, const QString &s2)
 
Q_EXPORT QString operator+ (const QString &s1, QChar c2)
 
Q_EXPORT QString operator+ (const QString &s1, char c2)
 
Q_EXPORT QString operator+ (QChar c1, const QString &s2)
 
Q_EXPORT QString operator+ (char c1, const QString &s2)
 

Macro Definition Documentation

#define QT_NO_ASCII_CAST

Definition at line 46 of file qstring.h.

Function Documentation

int operator!= ( QChar  c1,
QChar  c2 
)
inline

Definition at line 286 of file qstring.h.

287 {
288  return c1.cl != c2.cl
289  || c1.rw != c2.rw;
290 }
uchar cl
Definition: qstring.h:189
uchar rw
Definition: qstring.h:188
int operator!= ( char  ch,
QChar  c 
)
inline

Definition at line 292 of file qstring.h.

293 {
294  return ch != c.cl || c.rw;
295 }
uchar cl
Definition: qstring.h:189
uchar rw
Definition: qstring.h:188
int operator!= ( QChar  c,
char  ch 
)
inline

Definition at line 297 of file qstring.h.

298 {
299  return ch != c.cl || c.rw;
300 }
uchar cl
Definition: qstring.h:189
uchar rw
Definition: qstring.h:188
Q_EXPORT bool operator!= ( const QString s1,
const QString s2 
)
related

Definition at line 14850 of file qstring.cpp.

14851 { return !(s1==s2); }
Q_EXPORT bool operator!= ( const QString s1,
const char *  s2 
)
related

Definition at line 14872 of file qstring.cpp.

14873 { return !(s1==s2); }
Q_EXPORT bool operator!= ( const char *  s1,
const QString s2 
)
related

Definition at line 14875 of file qstring.cpp.

14876 { return !(s1==s2); }
Q_EXPORT QString operator+ ( const QString s1,
const QString s2 
)
related

Definition at line 774 of file qstring.h.

775 {
776  QString tmp( s1 );
777  tmp += s2;
778  return tmp;
779 }
The QString class provides an abstraction of Unicode text and the classic C null-terminated char arra...
Definition: qstring.h:350
string tmp
Definition: languages.py:63
Q_EXPORT QString operator+ ( const QString s1,
const char *  s2 
)
related

Definition at line 782 of file qstring.h.

783 {
784  QString tmp( s1 );
785  tmp += QString::fromLatin1(s2);
786  return tmp;
787 }
The QString class provides an abstraction of Unicode text and the classic C null-terminated char arra...
Definition: qstring.h:350
static QString fromLatin1(const char *, int len=-1)
Definition: qstring.cpp:14539
string tmp
Definition: languages.py:63
Q_EXPORT QString operator+ ( const char *  s1,
const QString s2 
)
related

Definition at line 789 of file qstring.h.

790 {
792  tmp += s2;
793  return tmp;
794 }
The QString class provides an abstraction of Unicode text and the classic C null-terminated char arra...
Definition: qstring.h:350
static QString fromLatin1(const char *, int len=-1)
Definition: qstring.cpp:14539
string tmp
Definition: languages.py:63
Q_EXPORT QString operator+ ( const QString s1,
QChar  c2 
)
inline

Definition at line 797 of file qstring.h.

798 {
799  QString tmp( s1 );
800  tmp += c2;
801  return tmp;
802 }
The QString class provides an abstraction of Unicode text and the classic C null-terminated char arra...
Definition: qstring.h:350
string tmp
Definition: languages.py:63
Q_EXPORT QString operator+ ( const QString s1,
char  c2 
)
related

Definition at line 804 of file qstring.h.

805 {
806  QString tmp( s1 );
807  tmp += c2;
808  return tmp;
809 }
The QString class provides an abstraction of Unicode text and the classic C null-terminated char arra...
Definition: qstring.h:350
string tmp
Definition: languages.py:63
Q_EXPORT QString operator+ ( QChar  c1,
const QString s2 
)
inline

Definition at line 811 of file qstring.h.

812 {
813  QString tmp;
814  tmp += c1;
815  tmp += s2;
816  return tmp;
817 }
The QString class provides an abstraction of Unicode text and the classic C null-terminated char arra...
Definition: qstring.h:350
string tmp
Definition: languages.py:63
Q_EXPORT QString operator+ ( char  c1,
const QString s2 
)
related

Definition at line 819 of file qstring.h.

820 {
821  QString tmp;
822  tmp += c1;
823  tmp += s2;
824  return tmp;
825 }
The QString class provides an abstraction of Unicode text and the classic C null-terminated char arra...
Definition: qstring.h:350
string tmp
Definition: languages.py:63
int operator< ( QChar  c,
char  ch 
)
related

Definition at line 324 of file qstring.h.

324 { return !(ch<=c); }
int operator< ( char  ch,
QChar  c 
)
related

Definition at line 325 of file qstring.h.

325 { return !(c<=ch); }
int operator< ( QChar  c1,
QChar  c2 
)
related

Definition at line 326 of file qstring.h.

326 { return !(c2<=c1); }
Q_EXPORT bool operator< ( const QString s1,
const QString s2 
)

Definition at line 14853 of file qstring.cpp.

14854 { return ucstrcmp(s1,s2) < 0; }
static int ucstrcmp(const QString &as, const QString &bs)
Definition: qstring.cpp:10693
Q_EXPORT bool operator< ( const QString s1,
const char *  s2 
)
related

Definition at line 14878 of file qstring.cpp.

14879 { return ucstrcmp(s1,s2) < 0; }
static int ucstrcmp(const QString &as, const QString &bs)
Definition: qstring.cpp:10693
Q_EXPORT bool operator< ( const char *  s1,
const QString s2 
)
related

Definition at line 14881 of file qstring.cpp.

14882 { return ucstrcmp(s1,s2) < 0; }
static int ucstrcmp(const QString &as, const QString &bs)
Definition: qstring.cpp:10693
Q_EXPORT QDataStream& operator<< ( QDataStream ,
const QString  
)
related
int operator<= ( QChar  c,
char  ch 
)
inline

Definition at line 302 of file qstring.h.

303 {
304  return !(ch < c.cl || c.rw);
305 }
uchar cl
Definition: qstring.h:189
uchar rw
Definition: qstring.h:188
int operator<= ( char  ch,
QChar  c 
)
inline

Definition at line 307 of file qstring.h.

308 {
309  return ch <= c.cl || c.rw;
310 }
uchar cl
Definition: qstring.h:189
uchar rw
Definition: qstring.h:188
int operator<= ( QChar  c1,
QChar  c2 
)
inline

Definition at line 312 of file qstring.h.

313 {
314  return c1.rw > c2.rw
315  ? FALSE
316  : c1.rw < c2.rw
317  ? TRUE
318  : c1.cl <= c2.cl;
319 }
uchar cl
Definition: qstring.h:189
uchar rw
Definition: qstring.h:188
const bool FALSE
Definition: qglobal.h:370
const bool TRUE
Definition: qglobal.h:371
Q_EXPORT bool operator<= ( const QString s1,
const QString s2 
)

Definition at line 14856 of file qstring.cpp.

14857 { return ucstrcmp(s1,s2) <= 0; }
static int ucstrcmp(const QString &as, const QString &bs)
Definition: qstring.cpp:10693
Q_EXPORT bool operator<= ( const QString s1,
const char *  s2 
)
related

Definition at line 14884 of file qstring.cpp.

14885 { return ucstrcmp(s1,s2) <= 0; }
static int ucstrcmp(const QString &as, const QString &bs)
Definition: qstring.cpp:10693
Q_EXPORT bool operator<= ( const char *  s1,
const QString s2 
)
related

Definition at line 14887 of file qstring.cpp.

14888 { return ucstrcmp(s1,s2) <= 0; }
static int ucstrcmp(const QString &as, const QString &bs)
Definition: qstring.cpp:10693
int operator== ( char  ch,
QChar  c 
)
inline

Definition at line 270 of file qstring.h.

271 {
272  return ch == c.cl && !c.rw;
273 }
uchar cl
Definition: qstring.h:189
uchar rw
Definition: qstring.h:188
int operator== ( QChar  c,
char  ch 
)
inline

Definition at line 275 of file qstring.h.

276 {
277  return ch == c.cl && !c.rw;
278 }
uchar cl
Definition: qstring.h:189
uchar rw
Definition: qstring.h:188
int operator== ( QChar  c1,
QChar  c2 
)
inline

Definition at line 280 of file qstring.h.

281 {
282  return c1.cl == c2.cl
283  && c1.rw == c2.rw;
284 }
uchar cl
Definition: qstring.h:189
uchar rw
Definition: qstring.h:188
Q_EXPORT bool operator== ( const QString s1,
const QString s2 
)
related

Definition at line 14843 of file qstring.cpp.

14844 {
14845  return (s1.length() == s2.length()) && s1.isNull() == s2.isNull() &&
14846  (memcmp((char*)s1.unicode(),(char*)s2.unicode(),
14847  s1.length()*sizeof(QChar)) ==0);
14848 }
const QChar * unicode() const
Definition: qstring.h:508
The QChar class provides a light-weight Unicode character.
Definition: qstring.h:56
uint length() const
Definition: qstring.h:679
bool isNull() const
Definition: qstring.h:379
Q_EXPORT bool operator== ( const QString s1,
const char *  s2 
)
related

Definition at line 14866 of file qstring.cpp.

14867 { return s1==QString(s2); }
The QString class provides an abstraction of Unicode text and the classic C null-terminated char arra...
Definition: qstring.h:350
Q_EXPORT bool operator== ( const char *  s1,
const QString s2 
)
related

Definition at line 14869 of file qstring.cpp.

14870 { return QString(s1)==s2; }
The QString class provides an abstraction of Unicode text and the classic C null-terminated char arra...
Definition: qstring.h:350
int operator> ( QChar  c,
char  ch 
)
related

Definition at line 327 of file qstring.h.

327 { return !(ch>=c); }
int operator> ( char  ch,
QChar  c 
)
related

Definition at line 328 of file qstring.h.

328 { return !(c>=ch); }
int operator> ( QChar  c1,
QChar  c2 
)
related

Definition at line 329 of file qstring.h.

329 { return !(c2>=c1); }
Q_EXPORT bool operator> ( const QString s1,
const QString s2 
)

Definition at line 14859 of file qstring.cpp.

14860 { return ucstrcmp(s1,s2) > 0; }
static int ucstrcmp(const QString &as, const QString &bs)
Definition: qstring.cpp:10693
Q_EXPORT bool operator> ( const QString s1,
const char *  s2 
)
related

Definition at line 14890 of file qstring.cpp.

14891 { return ucstrcmp(s1,s2) > 0; }
static int ucstrcmp(const QString &as, const QString &bs)
Definition: qstring.cpp:10693
int operator>= ( QChar  c,
char  ch 
)
related

Definition at line 321 of file qstring.h.

321 { return ch <= c; }
int operator>= ( char  ch,
QChar  c 
)
related

Definition at line 322 of file qstring.h.

322 { return c <= ch; }
int operator>= ( QChar  c1,
QChar  c2 
)
related

Definition at line 323 of file qstring.h.

323 { return c2 <= c1; }
Q_EXPORT bool operator>= ( const QString s1,
const QString s2 
)

Definition at line 14862 of file qstring.cpp.

14863 { return ucstrcmp(s1,s2) >= 0; }
static int ucstrcmp(const QString &as, const QString &bs)
Definition: qstring.cpp:10693
Q_EXPORT bool operator>= ( const QString s1,
const char *  s2 
)
related

Definition at line 14896 of file qstring.cpp.

14897 { return ucstrcmp(s1,s2) >= 0; }
static int ucstrcmp(const QString &as, const QString &bs)
Definition: qstring.cpp:10693
Q_EXPORT bool operator>= ( const char *  s1,
const QString s2 
)
related

Definition at line 14899 of file qstring.cpp.

14900 { return ucstrcmp(s1,s2) >= 0; }
static int ucstrcmp(const QString &as, const QString &bs)
Definition: qstring.cpp:10693
Q_EXPORT QDataStream& operator>> ( QDataStream ,
QString  
)