The QString class provides an abstraction of Unicode text and the classic C '\0'-terminated char array. More...
All the functions in this class are reentrant when Qt is built with thread support.
List of all member functions.
-
QString ()
-
QString ( QChar ch )
-
QString ( const QString & s )
-
QString ( const QByteArray & ba )
-
QString ( const QChar * unicode, uint length )
-
QString ( const char * str )
-
QString ( const std::string & str )
-
~QString ()
-
QString &
operator= ( const QString & s )
-
QString &
operator= ( const char * str )
-
QString &
operator= ( const std::string & s )
-
QString &
operator= ( const QCString & cs )
-
QString &
operator= ( QChar c )
-
QString &
operator= ( char c )
-
bool
isNull () const
-
bool
isEmpty () const
-
uint
length () const
-
void
truncate ( uint newLen )
-
QString &
fill ( QChar c, int len = -1 )
-
QString copy () const
(obsolete)
-
QString
arg ( long a, int fieldwidth = 0, int base = 10 ) const
-
QString
arg ( ulong a, int fieldwidth = 0, int base = 10 ) const
-
QString
arg ( int a, int fieldwidth = 0, int base = 10 ) const
-
QString
arg ( uint a, int fieldwidth = 0, int base = 10 ) const
-
QString
arg ( short a, int fieldwidth = 0, int base = 10 ) const
-
QString
arg ( ushort a, int fieldwidth = 0, int base = 10 ) const
-
QString
arg ( char a, int fieldwidth = 0 ) const
-
QString
arg ( QChar a, int fieldwidth = 0 ) const
-
QString
arg ( const QString & a, int fieldwidth = 0 ) const
-
QString
arg ( double a, int fieldwidth = 0, char fmt = 'g', int prec = -1 ) const
-
QString &
sprintf ( const char * cformat, ... )
-
int
find ( QChar c, int index = 0, bool cs = TRUE ) const
-
int
find ( char c, int index = 0, bool cs = TRUE ) const
-
int
find ( const QString & str, int index = 0, bool cs = TRUE ) const
-
int
find ( const QRegExp & rx, int index = 0 ) const
-
int
find ( const char * str, int index = 0 ) const
-
int
findRev ( QChar c, int index = -1, bool cs = TRUE ) const
-
int
findRev ( char c, int index = -1, bool cs = TRUE ) const
-
int
findRev ( const QString & str, int index = -1, bool cs = TRUE ) const
-
int
findRev ( const QRegExp & rx, int index = -1 ) const
-
int
findRev ( const char * str, int index = -1 ) const
-
int
contains ( QChar c, bool cs = TRUE ) const
-
int
contains ( char c, bool cs = TRUE ) const
-
int
contains ( const char * str, bool cs = TRUE ) const
-
int
contains ( const QString & str, bool cs = TRUE ) const
-
int
contains ( const QRegExp & rx ) const
-
enum
SectionFlags { SectionDefault = 0x00, SectionSkipEmpty = 0x01, SectionIncludeLeadingSep = 0x02, SectionIncludeTrailingSep = 0x04, SectionCaseInsensitiveSeps = 0x08 }
-
QString
section ( QChar sep, int start, int end = 0xffffffff, int flags = SectionDefault ) const
-
QString
section ( char sep, int start, int end = 0xffffffff, int flags = SectionDefault ) const
-
QString
section ( const char * sep, int start, int end = 0xffffffff, int flags = SectionDefault ) const
-
QString
section ( const QString & sep, int start, int end = 0xffffffff, int flags = SectionDefault ) const
-
QString
section ( const QRegExp & reg, int start, int end = 0xffffffff, int flags = SectionDefault ) const
-
QString
left ( uint len ) const
-
QString
right ( uint len ) const
-
QString
mid ( uint index, uint len = 0xffffffff ) const
-
QString
leftJustify ( uint width, QChar fill = ' ', bool truncate = FALSE ) const
-
QString
rightJustify ( uint width, QChar fill = ' ', bool truncate = FALSE ) const
-
QString
lower () const
-
QString
upper () const
-
QString
stripWhiteSpace () const
-
QString
simplifyWhiteSpace () const
-
QString &
insert ( uint index, const QString & s )
-
QString &
insert ( uint index, const QChar * s, uint len )
-
QString &
insert ( uint index, QChar c )
-
QString &
insert ( uint index, char c )
-
QString &
append ( char ch )
-
QString &
append ( QChar ch )
-
QString &
append ( const QString & str )
-
QString &
append ( const QByteArray & str )
-
QString &
append ( const char * str )
-
QString &
append ( const std::string & str )
-
QString &
prepend ( char ch )
-
QString &
prepend ( QChar ch )
-
QString &
prepend ( const QString & s )
-
QString &
prepend ( const QByteArray & s )
-
QString &
prepend ( const char * s )
-
QString &
prepend ( const std::string & s )
-
QString &
remove ( uint index, uint len )
-
QString &
remove ( QChar c )
-
QString &
remove ( char c )
-
QString &
remove ( const QString & str )
-
QString &
remove ( const QRegExp & rx )
-
QString &
remove ( const char * str )
-
QString &
replace ( uint index, uint len, const QString & s )
-
QString &
replace ( uint index, uint len, const QChar * s, uint slen )
-
QString &
replace ( uint index, uint len, QChar c )
-
QString &
replace ( uint index, uint len, char c )
-
QString &
replace ( QChar c, const QString & after )
-
QString &
replace ( char c, const QString & after )
-
QString &
replace ( const QString & before, const QString & after )
-
QString &
replace ( const QRegExp & rx, const QString & str )
-
QString &
replace ( QChar c1, QChar c2 )
-
short
toShort ( bool * ok = 0, int base = 10 ) const
-
ushort
toUShort ( bool * ok = 0, int base = 10 ) const
-
int
toInt ( bool * ok = 0, int base = 10 ) const
-
uint
toUInt ( bool * ok = 0, int base = 10 ) const
-
long
toLong ( bool * ok = 0, int base = 10 ) const
-
ulong
toULong ( bool * ok = 0, int base = 10 ) const
-
float
toFloat ( bool * ok = 0 ) const
-
double
toDouble ( bool * ok = 0 ) const
-
QString &
setNum ( short n, int base = 10 )
-
QString &
setNum ( ushort n, int base = 10 )
-
QString &
setNum ( int n, int base = 10 )
-
QString &
setNum ( uint n, int base = 10 )
-
QString &
setNum ( long n, int base = 10 )
-
QString &
setNum ( ulong n, int base = 10 )
-
QString &
setNum ( float n, char f = 'g', int prec = 6 )
-
QString &
setNum ( double n, char f = 'g', int prec = 6 )
-
void setExpand ( uint index, QChar c )
(obsolete)
-
QString &
operator+= ( const QString & str )
-
QString &
operator+= ( const QByteArray & str )
-
QString &
operator+= ( const char * str )
-
QString &
operator+= ( const std::string & str )
-
QString &
operator+= ( QChar c )
-
QString &
operator+= ( char c )
-
QChar
at ( uint i ) const
-
QChar
operator[] ( int i ) const
-
QCharRef
at ( uint i )
-
QCharRef
operator[] ( int i )
-
QChar
constref ( uint i ) const
-
QChar &
ref ( uint i )
-
const QChar *
unicode () const
-
const char *
ascii () const
-
const char *
latin1 () const
-
QCString
utf8 () const
-
QCString
local8Bit () const
-
bool
operator! () const
-
operator const char * () const
-
operator std::string () const
-
const unsigned short *
ucs2 () const
-
QString &
setUnicode ( const QChar * unicode, uint len )
-
QString &
setUnicodeCodes ( const ushort * unicode_as_ushorts, uint len )
-
QString &
setAscii ( const char * str, int len = -1 )
-
QString &
setLatin1 ( const char * str, int len = -1 )
-
int
compare ( const QString & s ) const
-
int
localeAwareCompare ( const QString & s ) const
-
void
compose ()
-
const char * data () const
(obsolete)
-
bool
startsWith ( const QString & s ) const
-
bool
endsWith ( const QString & s ) const
-
void
setLength ( uint newLen )