QByteArray Class Reference

#include <qbytearray.h>

Class Description

Public Types

typedef char * iterator
 
typedef const char * const_iterator
 
typedef iterator Iterator
 
typedef const_iterator ConstIterator
 
typedef const char & const_reference
 
typedef char & reference
 
typedef char value_type
 
typedef Data * DataPtr
 

Public Member Functions

 QByteArray ()
 
 QByteArray (const char *)
 
 QByteArray (const char *, int size)
 
 QByteArray (int size, char c)
 
 QByteArray (int size, Qt::Initialization)
 
 QByteArray (const QByteArray &)
 
 ~QByteArray ()
 
QByteArrayoperator= (const QByteArray &)
 
QByteArrayoperator= (const char *str)
 
void swap (QByteArray &other)
 
int size () const
 
bool isEmpty () const
 
void resize (int size)
 
QByteArrayfill (char c, int size=-1)
 
int capacity () const
 
void reserve (int size)
 
void squeeze ()
 
 operator const char * () const
 
 operator const void * () const
 
char * data ()
 
const char * data () const
 
const char * constData () const
 
void detach ()
 
bool isDetached () const
 
bool isSharedWith (const QByteArray &other) const
 
void clear ()
 
char at (int i) const
 
char operator[] (int i) const
 
char operator[] (uint i) const
 
QByteRef operator[] (int i)
 
QByteRef operator[] (uint i)
 
int indexOf (char c, int from=0) const
 
int indexOf (const char *c, int from=0) const
 
int indexOf (const QByteArray &a, int from=0) const
 
int lastIndexOf (char c, int from=-1) const
 
int lastIndexOf (const char *c, int from=-1) const
 
int lastIndexOf (const QByteArray &a, int from=-1) const
 
QBool contains (char c) const
 
QBool contains (const char *a) const
 
QBool contains (const QByteArray &a) const
 
int count (char c) const
 
int count (const char *a) const
 
int count (const QByteArray &a) const
 
QByteArray left (int len) const
 
QByteArray right (int len) const
 
QByteArray mid (int index, int len=-1) const
 
bool startsWith (const QByteArray &a) const
 
bool startsWith (char c) const
 
bool startsWith (const char *c) const
 
bool endsWith (const QByteArray &a) const
 
bool endsWith (char c) const
 
bool endsWith (const char *c) const
 
void truncate (int pos)
 
void chop (int n)
 
QByteArray toLower () const
 
QByteArray toUpper () const
 
QByteArray trimmed () const
 
QByteArray simplified () const
 
QByteArray leftJustified (int width, char fill= ' ', bool truncate=false) const
 
QByteArray rightJustified (int width, char fill= ' ', bool truncate=false) const
 
QByteArrayprepend (char c)
 
QByteArrayprepend (const char *s)
 
QByteArrayprepend (const char *s, int len)
 
QByteArrayprepend (const QByteArray &a)
 
QByteArrayappend (char c)
 
QByteArrayappend (const char *s)
 
QByteArrayappend (const char *s, int len)
 
QByteArrayappend (const QByteArray &a)
 
QByteArrayinsert (int i, char c)
 
QByteArrayinsert (int i, const char *s)
 
QByteArrayinsert (int i, const char *s, int len)
 
QByteArrayinsert (int i, const QByteArray &a)
 
QByteArrayremove (int index, int len)
 
QByteArrayreplace (int index, int len, const char *s)
 
QByteArrayreplace (int index, int len, const char *s, int alen)
 
QByteArrayreplace (int index, int len, const QByteArray &s)
 
QByteArrayreplace (char before, const char *after)
 
QByteArrayreplace (char before, const QByteArray &after)
 
QByteArrayreplace (const char *before, const char *after)
 
QByteArrayreplace (const char *before, int bsize, const char *after, int asize)
 
QByteArrayreplace (const QByteArray &before, const QByteArray &after)
 
QByteArrayreplace (const QByteArray &before, const char *after)
 
QByteArrayreplace (const char *before, const QByteArray &after)
 
QByteArrayreplace (char before, char after)
 
QByteArrayoperator+= (char c)
 
QByteArrayoperator+= (const char *s)
 
QByteArrayoperator+= (const QByteArray &a)
 
QList< QByteArraysplit (char sep) const
 
QByteArray repeated (int times) const
 
QT_ASCII_CAST_WARN QByteArrayappend (const QString &s)
 
QT_ASCII_CAST_WARN QByteArrayinsert (int i, const QString &s)
 
QT_ASCII_CAST_WARN QByteArrayreplace (const QString &before, const char *after)
 
QT_ASCII_CAST_WARN QByteArrayreplace (char c, const QString &after)
 
QT_ASCII_CAST_WARN QByteArrayreplace (const QString &before, const QByteArray &after)
 
QT_ASCII_CAST_WARN QByteArrayoperator+= (const QString &s)
 
QT_ASCII_CAST_WARN int indexOf (const QString &s, int from=0) const
 
QT_ASCII_CAST_WARN int lastIndexOf (const QString &s, int from=-1) const
 
QT_ASCII_CAST_WARN bool operator== (const QString &s2) const
 
QT_ASCII_CAST_WARN bool operator!= (const QString &s2) const
 
QT_ASCII_CAST_WARN bool operator< (const QString &s2) const
 
QT_ASCII_CAST_WARN bool operator> (const QString &s2) const
 
QT_ASCII_CAST_WARN bool operator<= (const QString &s2) const
 
QT_ASCII_CAST_WARN bool operator>= (const QString &s2) const
 
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
 
qlonglong toLongLong (bool *ok=0, int base=10) const
 
qulonglong toULongLong (bool *ok=0, int base=10) const
 
float toFloat (bool *ok=0) const
 
double toDouble (bool *ok=0) const
 
QByteArray toBase64 () const
 
QByteArray toHex () const
 
QByteArray toPercentEncoding (const QByteArray &exclude=QByteArray(), const QByteArray &include=QByteArray(), char percent= '%') const
 
QByteArraysetNum (short, int base=10)
 
QByteArraysetNum (ushort, int base=10)
 
QByteArraysetNum (int, int base=10)
 
QByteArraysetNum (uint, int base=10)
 
QByteArraysetNum (qlonglong, int base=10)
 
QByteArraysetNum (qulonglong, int base=10)
 
QByteArraysetNum (float, char f= 'g', int prec=6)
 
QByteArraysetNum (double, char f= 'g', int prec=6)
 
QByteArraysetRawData (const char *a, uint n)
 
iterator begin ()
 
const_iterator begin () const
 
const_iterator constBegin () const
 
iterator end ()
 
const_iterator end () const
 
const_iterator constEnd () const
 
void push_back (char c)
 
void push_back (const char *c)
 
void push_back (const QByteArray &a)
 
void push_front (char c)
 
void push_front (const char *c)
 
void push_front (const QByteArray &a)
 
int count () const
 
int length () const
 
bool isNull () const
 
DataPtrdata_ptr ()
 

Static Public Member Functions

static QByteArray number (int, int base=10)
 
static QByteArray number (uint, int base=10)
 
static QByteArray number (qlonglong, int base=10)
 
static QByteArray number (qulonglong, int base=10)
 
static QByteArray number (double, char f= 'g', int prec=6)
 
static QByteArray fromRawData (const char *, int size)
 
static QByteArray fromBase64 (const QByteArray &base64)
 
static QByteArray fromHex (const QByteArray &hexEncoded)
 
static QByteArray fromPercentEncoding (const QByteArray &pctEncoded, char percent= '%')
 

Friends

class QByteRef
 
class QString
 
Q_CORE_EXPORT QByteArray qUncompress (const uchar *data, int nbytes)
 

Member Typedef Documentation

typedef char* iterator

Definition at line 333 of file qbytearray.h.

typedef const char* const_iterator

Definition at line 334 of file qbytearray.h.

typedef iterator Iterator

Definition at line 335 of file qbytearray.h.

Definition at line 336 of file qbytearray.h.

typedef const char& const_reference

Definition at line 345 of file qbytearray.h.

typedef char& reference

Definition at line 346 of file qbytearray.h.

typedef char value_type

Definition at line 347 of file qbytearray.h.

typedef Data* DataPtr

Definition at line 396 of file qbytearray.h.

Constructor & Destructor Documentation

QByteArray ( )
inline

Definition at line 400 of file qbytearray.h.

400 : d(&shared_null) { d->ref.ref(); }
QByteArray ( const char *  )
QByteArray ( const char *  ,
int  size 
)
QByteArray ( int  size,
char  c 
)
QByteArray ( int  size,
Qt::Initialization   
)
QByteArray ( const QByteArray a)
inline

Definition at line 439 of file qbytearray.h.

439  : d(a.d)
440 { d->ref.ref(); }
~QByteArray ( )
inline

Definition at line 401 of file qbytearray.h.

401 { if (!d->ref.deref()) qFree(d); }

Member Function Documentation

QByteArray& operator= ( const QByteArray )
QByteArray& operator= ( const char *  str)
void swap ( QByteArray other)
inline

Definition at line 164 of file qbytearray.h.

164 { qSwap(d, other.d); }
Q_INLINE_TEMPLATE void qSwap(QScopedPointer< T, Cleanup > &p1, QScopedPointer< T, Cleanup > &p2)
int size ( ) const
inline

Definition at line 402 of file qbytearray.h.

403 { return d->size; }
bool isEmpty ( ) const
inline

Definition at line 421 of file qbytearray.h.

422 { return d->size == 0; }
void resize ( int  size)
QByteArray& fill ( char  c,
int  size = -1 
)
int capacity ( ) const
inline

Definition at line 446 of file qbytearray.h.

447 { return d->alloc; }
void reserve ( int  size)
inline

Definition at line 449 of file qbytearray.h.

450 { if (d->ref != 1 || asize > d->alloc) realloc(asize); }
void squeeze ( )
inline

Definition at line 452 of file qbytearray.h.

453 { if (d->size < d->alloc) realloc(d->size); }
operator const char * ( ) const
inline

Definition at line 424 of file qbytearray.h.

425 { return d->data; }
operator const void * ( ) const
inline

Definition at line 426 of file qbytearray.h.

427 { return d->data; }
char * data ( )
inline

Definition at line 429 of file qbytearray.h.

430 { detach(); return d->data; }
void detach()
Definition: qbytearray.h:435
const char * data ( ) const
inline

Definition at line 431 of file qbytearray.h.

432 { return d->data; }
void detach ( )
inline

Definition at line 435 of file qbytearray.h.

436 { if (d->ref != 1 || d->data != d->array) realloc(d->size); }
bool isDetached ( ) const
inline

Definition at line 437 of file qbytearray.h.

438 { return d->ref == 1; }
bool isSharedWith ( const QByteArray other) const
inline

Definition at line 185 of file qbytearray.h.

185 { return d == other.d; }
void clear ( )
char at ( int  i) const
inline

Definition at line 413 of file qbytearray.h.

414 { Q_ASSERT(uint(i) < uint(size())); return d->data[i]; }
int size() const
Definition: qbytearray.h:402
char operator[] ( int  i) const
inline

Definition at line 415 of file qbytearray.h.

416 { Q_ASSERT(uint(i) < uint(size())); return d->data[i]; }
int size() const
Definition: qbytearray.h:402
char operator[] ( uint  i) const
inline

Definition at line 417 of file qbytearray.h.

418 { Q_ASSERT(i < uint(size())); return d->data[i]; }
int size() const
Definition: qbytearray.h:402
QByteRef operator[] ( int  i)
inline

Definition at line 489 of file qbytearray.h.

490 { Q_ASSERT(i >= 0); return QByteRef(*this, i); }
friend class QByteRef
Definition: qbytearray.h:392
QByteRef operator[] ( uint  i)
inline

Definition at line 491 of file qbytearray.h.

492 { return QByteRef(*this, i); }
friend class QByteRef
Definition: qbytearray.h:392
int indexOf ( char  c,
int  from = 0 
) const
int indexOf ( const char *  c,
int  from = 0 
) const
int indexOf ( const QByteArray a,
int  from = 0 
) const
int lastIndexOf ( char  c,
int  from = -1 
) const
int lastIndexOf ( const char *  c,
int  from = -1 
) const
int lastIndexOf ( const QByteArray a,
int  from = -1 
) const
QBool contains ( char  c) const
inline

Definition at line 525 of file qbytearray.h.

526 { return QBool(indexOf(c) != -1); }
int indexOf(char c, int from=0) const
const GLubyte * c
Definition: GLee.h:5419
QBool contains ( const char *  a) const
inline

Definition at line 575 of file qbytearray.h.

576 { return QBool(indexOf(c) != -1); }
int indexOf(char c, int from=0) const
const GLubyte * c
Definition: GLee.h:5419
QBool contains ( const QByteArray a) const
inline

Definition at line 523 of file qbytearray.h.

524 { return QBool(indexOf(a) != -1); }
int indexOf(char c, int from=0) const
int count ( char  c) const
int count ( const char *  a) const
int count ( const QByteArray a) const
QByteArray left ( int  len) const
QByteArray right ( int  len) const
QByteArray mid ( int  index,
int  len = -1 
) const
bool startsWith ( const QByteArray a) const
bool startsWith ( char  c) const
bool startsWith ( const char *  c) const
bool endsWith ( const QByteArray a) const
bool endsWith ( char  c) const
bool endsWith ( const char *  c) const
void truncate ( int  pos)
void chop ( int  n)
QByteArray toLower ( ) const
QByteArray toUpper ( ) const
QByteArray trimmed ( ) const
QByteArray simplified ( ) const
QByteArray leftJustified ( int  width,
char  fill = ' ',
bool  truncate = false 
) const
QByteArray rightJustified ( int  width,
char  fill = ' ',
bool  truncate = false 
) const
QByteArray& prepend ( char  c)
QByteArray& prepend ( const char *  s)
QByteArray& prepend ( const char *  s,
int  len 
)
QByteArray& prepend ( const QByteArray a)
QByteArray& append ( char  c)
QByteArray& append ( const char *  s)
QByteArray& append ( const char *  s,
int  len 
)
QByteArray& append ( const QByteArray a)
QByteArray& insert ( int  i,
char  c 
)
QByteArray& insert ( int  i,
const char *  s 
)
QByteArray& insert ( int  i,
const char *  s,
int  len 
)
QByteArray& insert ( int  i,
const QByteArray a 
)
QByteArray& remove ( int  index,
int  len 
)
QByteArray& replace ( int  index,
int  len,
const char *  s 
)
QByteArray& replace ( int  index,
int  len,
const char *  s,
int  alen 
)
QByteArray& replace ( int  index,
int  len,
const QByteArray s 
)
QByteArray & replace ( char  before,
const char *  after 
)
inline

Definition at line 577 of file qbytearray.h.

578 { return replace(&before, 1, c, qstrlen(c)); }
QByteArray & replace(int index, int len, const char *s)
uint qstrlen(const char *str)
Definition: qbytearray.h:79
const GLubyte * c
Definition: GLee.h:5419
QByteArray& replace ( char  before,
const QByteArray after 
)
QByteArray & replace ( const char *  before,
const char *  after 
)
inline

Definition at line 581 of file qbytearray.h.

582 { return replace(before, qstrlen(before), after, qstrlen(after)); }
QByteArray & replace(int index, int len, const char *s)
uint qstrlen(const char *str)
Definition: qbytearray.h:79
QByteArray& replace ( const char *  before,
int  bsize,
const char *  after,
int  asize 
)
QByteArray& replace ( const QByteArray before,
const QByteArray after 
)
QByteArray & replace ( const QByteArray before,
const char *  after 
)
inline

Definition at line 579 of file qbytearray.h.

580 { return replace(before.constData(), before.size(), c, qstrlen(c)); }
QByteArray & replace(int index, int len, const char *s)
const char * constData() const
Definition: qbytearray.h:433
uint qstrlen(const char *str)
Definition: qbytearray.h:79
const GLubyte * c
Definition: GLee.h:5419
int size() const
Definition: qbytearray.h:402
QByteArray& replace ( const char *  before,
const QByteArray after 
)
QByteArray& replace ( char  before,
char  after 
)
QByteArray & operator+= ( char  c)
inline

Definition at line 505 of file qbytearray.h.

506 { return append(c); }
QByteArray & append(char c)
const GLubyte * c
Definition: GLee.h:5419
QByteArray & operator+= ( const char *  s)
inline

Definition at line 507 of file qbytearray.h.

508 { return append(s); }
QByteArray & append(char c)
GLdouble s
Definition: GLee.h:1173
QByteArray & operator+= ( const QByteArray a)
inline

Definition at line 509 of file qbytearray.h.

510 { return append(a); }
QByteArray & append(char c)
QList<QByteArray> split ( char  sep) const
QByteArray repeated ( int  times) const
QByteArray & append ( const QString s)
inline

Definition at line 996 of file qstring.h.

997 { return append(s.toAscii()); }
QByteArray & append(char c)
QByteArray toAscii() const Q_REQUIRED_RESULT
QByteArray & insert ( int  i,
const QString s 
)
inline

Definition at line 998 of file qstring.h.

999 { return insert(i, s.toAscii()); }
QByteArray & insert(int i, char c)
QByteArray toAscii() const Q_REQUIRED_RESULT
QByteArray & replace ( const QString before,
const char *  after 
)
inline

Definition at line 1002 of file qstring.h.

1003 { return replace(before.toAscii(), after); }
QByteArray & replace(int index, int len, const char *s)
QByteArray toAscii() const Q_REQUIRED_RESULT
QByteArray & replace ( char  c,
const QString after 
)
inline

Definition at line 1000 of file qstring.h.

1001 { return replace(c, after.toAscii()); }
QByteArray & replace(int index, int len, const char *s)
QByteArray toAscii() const Q_REQUIRED_RESULT
const GLubyte * c
Definition: GLee.h:5419
QByteArray & replace ( const QString before,
const QByteArray after 
)
inline

Definition at line 1004 of file qstring.h.

1005 { return replace(before.toAscii(), after); }
QByteArray & replace(int index, int len, const char *s)
QByteArray toAscii() const Q_REQUIRED_RESULT
QByteArray & operator+= ( const QString s)
inline

Definition at line 1006 of file qstring.h.

1007 { return operator+=(s.toAscii()); }
QByteArray toAscii() const Q_REQUIRED_RESULT
QByteArray & operator+=(char c)
Definition: qbytearray.h:505
int indexOf ( const QString s,
int  from = 0 
) const
inline

Definition at line 1008 of file qstring.h.

1009 { return indexOf(s.toAscii(), from); }
QByteArray toAscii() const Q_REQUIRED_RESULT
int indexOf(char c, int from=0) const
int lastIndexOf ( const QString s,
int  from = -1 
) const
inline

Definition at line 1010 of file qstring.h.

1011 { return lastIndexOf(s.toAscii(), from); }
QByteArray toAscii() const Q_REQUIRED_RESULT
int lastIndexOf(char c, int from=-1) const
bool operator== ( const QString s2) const
inline

Definition at line 981 of file qstring.h.

982 { return qStringComparisonHelper(s, constData()); }
bool qStringComparisonHelper(const QString &s1, const char *s2)
Definition: qstring.h:916
const char * constData() const
Definition: qbytearray.h:433
GLdouble s
Definition: GLee.h:1173
bool operator!= ( const QString s2) const
inline

Definition at line 983 of file qstring.h.

984 { return !qStringComparisonHelper(s, constData()); }
bool qStringComparisonHelper(const QString &s1, const char *s2)
Definition: qstring.h:916
const char * constData() const
Definition: qbytearray.h:433
GLdouble s
Definition: GLee.h:1173
bool operator< ( const QString s2) const
inline

Definition at line 985 of file qstring.h.

986 { return QString::fromAscii(constData(), size()) < s; }
static QString fromAscii(const char *, int size=-1)
const char * constData() const
Definition: qbytearray.h:433
int size() const
Definition: qbytearray.h:402
GLdouble s
Definition: GLee.h:1173
bool operator> ( const QString s2) const
inline

Definition at line 987 of file qstring.h.

988 { return QString::fromAscii(constData(), size()) > s; }
static QString fromAscii(const char *, int size=-1)
const char * constData() const
Definition: qbytearray.h:433
int size() const
Definition: qbytearray.h:402
GLdouble s
Definition: GLee.h:1173
bool operator<= ( const QString s2) const
inline

Definition at line 989 of file qstring.h.

990 { return QString::fromAscii(constData(), size()) <= s; }
static QString fromAscii(const char *, int size=-1)
const char * constData() const
Definition: qbytearray.h:433
int size() const
Definition: qbytearray.h:402
GLdouble s
Definition: GLee.h:1173
bool operator>= ( const QString s2) const
inline

Definition at line 991 of file qstring.h.

992 { return QString::fromAscii(constData(), size()) >= s; }
static QString fromAscii(const char *, int size=-1)
const char * constData() const
Definition: qbytearray.h:433
int size() const
Definition: qbytearray.h:402
GLdouble s
Definition: GLee.h:1173
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
qlonglong toLongLong ( bool *  ok = 0,
int  base = 10 
) const
qulonglong toULongLong ( bool *  ok = 0,
int  base = 10 
) const
float toFloat ( bool *  ok = 0) const
double toDouble ( bool *  ok = 0) const
QByteArray toBase64 ( ) const
QByteArray toHex ( ) const
QByteArray toPercentEncoding ( const QByteArray exclude = QByteArray(),
const QByteArray include = QByteArray(),
char  percent = '%' 
) const
QByteArray & setNum ( short  n,
int  base = 10 
)
inline

Definition at line 584 of file qbytearray.h.

585 { return setNum(qlonglong(n), base); }
GLenum GLsizei n
Definition: GLee.h:3432
QByteArray & setNum(short, int base=10)
Definition: qbytearray.h:584
qint64 qlonglong
Definition: qglobal.h:951
QByteArray & setNum ( ushort  n,
int  base = 10 
)
inline

Definition at line 586 of file qbytearray.h.

587 { return setNum(qulonglong(n), base); }
GLenum GLsizei n
Definition: GLee.h:3432
QByteArray & setNum(short, int base=10)
Definition: qbytearray.h:584
quint64 qulonglong
Definition: qglobal.h:952
QByteArray & setNum ( int  n,
int  base = 10 
)
inline

Definition at line 588 of file qbytearray.h.

589 { return setNum(qlonglong(n), base); }
GLenum GLsizei n
Definition: GLee.h:3432
QByteArray & setNum(short, int base=10)
Definition: qbytearray.h:584
qint64 qlonglong
Definition: qglobal.h:951
QByteArray & setNum ( uint  n,
int  base = 10 
)
inline

Definition at line 590 of file qbytearray.h.

591 { return setNum(qulonglong(n), base); }
GLenum GLsizei n
Definition: GLee.h:3432
QByteArray & setNum(short, int base=10)
Definition: qbytearray.h:584
quint64 qulonglong
Definition: qglobal.h:952
QByteArray& setNum ( qlonglong  ,
int  base = 10 
)
QByteArray& setNum ( qulonglong  ,
int  base = 10 
)
QByteArray & setNum ( float  n,
char  f = 'g',
int  prec = 6 
)
inline

Definition at line 592 of file qbytearray.h.

593 { return setNum(double(n),f,prec); }
GLenum GLsizei n
Definition: GLee.h:3432
QByteArray & setNum(short, int base=10)
Definition: qbytearray.h:584
GLclampf f
Definition: GLee.h:9303
QByteArray& setNum ( double  ,
char  f = 'g',
int  prec = 6 
)
QByteArray& setRawData ( const char *  a,
uint  n 
)
static QByteArray number ( int  ,
int  base = 10 
)
static
static QByteArray number ( uint  ,
int  base = 10 
)
static
static QByteArray number ( qlonglong  ,
int  base = 10 
)
static
static QByteArray number ( qulonglong  ,
int  base = 10 
)
static
static QByteArray number ( double  ,
char  f = 'g',
int  prec = 6 
)
static
static QByteArray fromRawData ( const char *  ,
int  size 
)
static
static QByteArray fromBase64 ( const QByteArray base64)
static
static QByteArray fromHex ( const QByteArray hexEncoded)
static
static QByteArray fromPercentEncoding ( const QByteArray pctEncoded,
char  percent = '%' 
)
static
QByteArray::iterator begin ( )
inline

Definition at line 493 of file qbytearray.h.

494 { detach(); return d->data; }
void detach()
Definition: qbytearray.h:435
QByteArray::const_iterator begin ( ) const
inline

Definition at line 495 of file qbytearray.h.

496 { return d->data; }
QByteArray::const_iterator constBegin ( ) const
inline

Definition at line 497 of file qbytearray.h.

498 { return d->data; }

Definition at line 499 of file qbytearray.h.

500 { detach(); return d->data + d->size; }
void detach()
Definition: qbytearray.h:435
QByteArray::const_iterator end ( ) const
inline

Definition at line 501 of file qbytearray.h.

502 { return d->data + d->size; }
QByteArray::const_iterator constEnd ( ) const
inline

Definition at line 503 of file qbytearray.h.

504 { return d->data + d->size; }
void push_back ( char  c)
inline

Definition at line 511 of file qbytearray.h.

512 { append(c); }
QByteArray & append(char c)
const GLubyte * c
Definition: GLee.h:5419
void push_back ( const char *  c)
inline

Definition at line 513 of file qbytearray.h.

514 { append(c); }
QByteArray & append(char c)
const GLubyte * c
Definition: GLee.h:5419
void push_back ( const QByteArray a)
inline

Definition at line 515 of file qbytearray.h.

516 { append(a); }
QByteArray & append(char c)
void push_front ( char  c)
inline

Definition at line 517 of file qbytearray.h.

518 { prepend(c); }
QByteArray & prepend(char c)
const GLubyte * c
Definition: GLee.h:5419
void push_front ( const char *  c)
inline

Definition at line 519 of file qbytearray.h.

520 { prepend(c); }
QByteArray & prepend(char c)
const GLubyte * c
Definition: GLee.h:5419
void push_front ( const QByteArray a)
inline

Definition at line 521 of file qbytearray.h.

522 { prepend(a); }
QByteArray & prepend(char c)
int count ( ) const
inline

Definition at line 355 of file qbytearray.h.

355 { return d->size; }
int length ( ) const
inline

Definition at line 356 of file qbytearray.h.

356 { return d->size; }
bool isNull ( ) const
DataPtr& data_ptr ( )
inline

Definition at line 397 of file qbytearray.h.

397 { return d; }

Friends And Related Function Documentation

friend class QByteRef
friend

Definition at line 392 of file qbytearray.h.

friend class QString
friend

Definition at line 393 of file qbytearray.h.

Q_CORE_EXPORT QByteArray qUncompress ( const uchar *  data,
int  nbytes 
)
friend

The documentation for this class was generated from the following files: