QByteArray

#include <QtCore/QByteArray>

More information will be added here shortly. For now, you'll find more extensive information about this class in the Qt reference for QByteArray


Overview

Classes

Public Types Index

const char *const_iterator
const char &const_reference
const_iteratorConstIterator
Data *DataPtr
char *iterator
iteratorIterator
char &reference
charvalue_type

Public Functions Index

QByteArray ()
QByteArray (const char *)
QByteArray (const char *, int size)
QByteArray (int size, char c)
QByteArray (int size, Qt::Initialization)
QByteArray (const QByteArray &)
~QByteArray ()
QByteArray &append (char c)
QByteArray &append (const char *s)
QByteArray &append (const char *s, int len)
QByteArray &append (const QByteArray &a)
QT_ASCII_CAST_WARN QByteArray &append (const QString &s)
charat (int i) const
iteratorbegin ()
const_iteratorbegin () const
intcapacity () const
voidchop (int n)
voidclear ()
const_iteratorconstBegin () const
const char *constData () const
const_iteratorconstEnd () const
QBoolcontains (char c) const
QBoolcontains (const char *a) const
QBoolcontains (const QByteArray &a) const
intcount (char c) const
intcount (const char *a) const
intcount (const QByteArray &a) const
intcount () const
char *data ()
const char *data () const
DataPtr &data_ptr ()
voiddetach ()
iteratorend ()
const_iteratorend () const
boolendsWith (const QByteArray &a) const
boolendsWith (char c) const
boolendsWith (const char *c) const
QByteArray &fill (char c, int size=-1)
intindexOf (char c, int from=0) const
intindexOf (const char *c, int from=0) const
intindexOf (const QByteArray &a, int from=0) const
QT_ASCII_CAST_WARN intindexOf (const QString &s, int from=0) const
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)
QT_ASCII_CAST_WARN QByteArray &insert (int i, const QString &s)
boolisDetached () const
boolisEmpty () const
boolisNull () const
boolisSharedWith (const QByteArray &other) const
intlastIndexOf (char c, int from=-1) const
intlastIndexOf (const char *c, int from=-1) const
intlastIndexOf (const QByteArray &a, int from=-1) const
QT_ASCII_CAST_WARN intlastIndexOf (const QString &s, int from=-1) const
QByteArrayleft (int len) const
QByteArrayleftJustified (int width, char fill= ' ', bool truncate=false) const
intlength () const
QByteArraymid (int index, int len=-1) const
operator const char * () const
operator const void * () const
QT_ASCII_CAST_WARN booloperator!= (const QString &s2) const
QByteArray &operator+= (char c)
QByteArray &operator+= (const char *s)
QByteArray &operator+= (const QByteArray &a)
QT_ASCII_CAST_WARN QByteArray &operator+= (const QString &s)
QT_ASCII_CAST_WARN booloperator< (const QString &s2) const
QT_ASCII_CAST_WARN booloperator<= (const QString &s2) const
QByteArray &operator= (const QByteArray &)
QByteArray &operator= (const char *str)
QT_ASCII_CAST_WARN booloperator== (const QString &s2) const
QT_ASCII_CAST_WARN booloperator> (const QString &s2) const
QT_ASCII_CAST_WARN booloperator>= (const QString &s2) const
charoperator[] (int i) const
charoperator[] (uint i) const
QByteRefoperator[] (int i)
QByteRefoperator[] (uint i)
QByteArray &prepend (char c)
QByteArray &prepend (const char *s)
QByteArray &prepend (const char *s, int len)
QByteArray &prepend (const QByteArray &a)
voidpush_back (char c)
voidpush_back (const char *c)
voidpush_back (const QByteArray &a)
voidpush_front (char c)
voidpush_front (const char *c)
voidpush_front (const QByteArray &a)
QByteArray &remove (int index, int len)
QByteArrayrepeated (int times) const
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)
QByteArray &replace (char before, const QByteArray &after)
QByteArray &replace (const char *before, const char *after)
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)
QByteArray &replace (const char *before, const QByteArray &after)
QByteArray &replace (char before, char after)
QT_ASCII_CAST_WARN QByteArray &replace (const QString &before, const char *after)
QT_ASCII_CAST_WARN QByteArray &replace (char c, const QString &after)
QT_ASCII_CAST_WARN QByteArray &replace (const QString &before, const QByteArray &after)
voidreserve (int size)
voidresize (int size)
QByteArrayright (int len) const
QByteArrayrightJustified (int width, char fill= ' ', bool truncate=false) const
QByteArray &setNum (short, int base=10)
QByteArray &setNum (ushort, int base=10)
QByteArray &setNum (int, int base=10)
QByteArray &setNum (uint, int base=10)
QByteArray &setNum (qlonglong, int base=10)
QByteArray &setNum (qulonglong, int base=10)
QByteArray &setNum (float, char f= 'g', int prec=6)
QByteArray &setNum (double, char f= 'g', int prec=6)
QByteArray &setRawData (const char *a, uint n)
QByteArraysimplified () const
intsize () const
QList< QByteArray >split (char sep) const
voidsqueeze ()
boolstartsWith (const QByteArray &a) const
boolstartsWith (char c) const
boolstartsWith (const char *c) const
voidswap (QByteArray &other)
QByteArraytoBase64 () const
doubletoDouble (bool *ok=0) const
floattoFloat (bool *ok=0) const
QByteArraytoHex () const
inttoInt (bool *ok=0, int base=10) const
longtoLong (bool *ok=0, int base=10) const
qlonglongtoLongLong (bool *ok=0, int base=10) const
QByteArraytoLower () const
QByteArraytoPercentEncoding (const QByteArray &exclude=QByteArray(), const QByteArray &include=QByteArray(), char percent= '%') const
shorttoShort (bool *ok=0, int base=10) const
uinttoUInt (bool *ok=0, int base=10) const
ulongtoULong (bool *ok=0, int base=10) const
qulonglongtoULongLong (bool *ok=0, int base=10) const
QByteArraytoUpper () const
ushorttoUShort (bool *ok=0, int base=10) const
QByteArraytrimmed () const
voidtruncate (int pos)

Static Public Functions Index

QByteArrayfromBase64 (const QByteArray &base64)
QByteArrayfromHex (const QByteArray &hexEncoded)
QByteArrayfromPercentEncoding (const QByteArray &pctEncoded, char percent= '%')
QByteArrayfromRawData (const char *, int size)
QByteArraynumber (int, int base=10)
QByteArraynumber (uint, int base=10)
QByteArraynumber (qlonglong, int base=10)
QByteArraynumber (qulonglong, int base=10)
QByteArraynumber (double, char f= 'g', int prec=6)

Public Types

typedef const char * const_iterator

typedef const char & const_reference

typedef const_iterator ConstIterator

typedef Data * DataPtr

typedef char * iterator

typedef iterator Iterator

typedef char & reference

typedef char value_type

Public Functions

QByteArray ()

QByteArray (
  • const char *)

QByteArray (
  • const char *,
  • intsize )

QByteArray (
  • intsize,
  • charc )

QByteArray (
  • intsize,
  • Qt::Initialization )

QByteArray (

~QByteArray ()

Destructor.

QByteArray & append (
  • charc)

QByteArray & append (
  • const char *s)

QByteArray & append (
  • const char *s,
  • intlen )

QByteArray & append (

QT_ASCII_CAST_WARN QByteArray & append (

char at (
  • inti)

iterator begin ()

const_iterator begin ()

int capacity ()

void chop (
  • intn)

void clear ()

const_iterator constBegin ()

const char * constData ()

const_iterator constEnd ()

QBool contains (
  • charc)

QBool contains (
  • const char *a)

QBool contains (

int count (
  • charc)

int count (
  • const char *a)

int count (

int count ()

char * data ()

const char * data ()

DataPtr & data_ptr ()

void detach ()

iterator end ()

const_iterator end ()

bool endsWith (

bool endsWith (
  • charc)

bool endsWith (
  • const char *c)

QByteArray & fill (
  • charc,
  • intsize )

int indexOf (
  • charc,
  • intfrom )

int indexOf (
  • const char *c,
  • intfrom )

int indexOf (

QT_ASCII_CAST_WARN int indexOf (

QByteArray & insert (
  • inti,
  • charc )

QByteArray & insert (
  • inti,
  • const char *s )

QByteArray & insert (
  • inti,
  • const char *s,
  • intlen )

QByteArray & insert (

QT_ASCII_CAST_WARN QByteArray & insert (

bool isDetached ()

bool isEmpty ()

bool isNull ()

bool isSharedWith (

int lastIndexOf (
  • charc,
  • intfrom )

int lastIndexOf (
  • const char *c,
  • intfrom )

int lastIndexOf (

QT_ASCII_CAST_WARN int lastIndexOf (

QByteArray left (
  • intlen)

QByteArray leftJustified (
  • intwidth,
  • charfill,
  • booltruncate )

int length ()

QByteArray mid (
  • intindex,
  • intlen )

operator const char * ()

operator const void * ()

QT_ASCII_CAST_WARN bool operator!= (

QByteArray & operator+= (
  • charc)

QByteArray & operator+= (
  • const char *s)

QByteArray & operator+= (

QT_ASCII_CAST_WARN QByteArray & operator+= (

QT_ASCII_CAST_WARN bool operator< (

QT_ASCII_CAST_WARN bool operator<= (

QByteArray & operator= (

QByteArray & operator= (
  • const char *str)

QT_ASCII_CAST_WARN bool operator== (

QT_ASCII_CAST_WARN bool operator> (

QT_ASCII_CAST_WARN bool operator>= (

char operator[] (
  • inti)

char operator[] (
  • uinti)

QByteRef operator[] (
  • inti)

QByteRef operator[] (
  • uinti)

QByteArray & prepend (
  • charc)

QByteArray & prepend (
  • const char *s)

QByteArray & prepend (
  • const char *s,
  • intlen )

QByteArray & prepend (

void push_back (
  • charc)

void push_back (
  • const char *c)

void push_back (

void push_front (
  • charc)

void push_front (
  • const char *c)

void push_front (

QByteArray & remove (
  • intindex,
  • intlen )

QByteArray repeated (
  • inttimes)

QByteArray & replace (
  • intindex,
  • intlen,
  • const char *s )

QByteArray & replace (
  • intindex,
  • intlen,
  • const char *s,
  • intalen )

QByteArray & replace (

QByteArray & replace (
  • charbefore,
  • const char *after )

QByteArray & replace (

QByteArray & replace (
  • const char *before,
  • const char *after )

QByteArray & replace (
  • const char *before,
  • intbsize,
  • const char *after,
  • intasize )

QByteArray & replace (

QByteArray & replace (

QByteArray & replace (

QByteArray & replace (
  • charbefore,
  • charafter )

QT_ASCII_CAST_WARN QByteArray & replace (
  • const QString &before,
  • const char *after )

QT_ASCII_CAST_WARN QByteArray & replace (

QT_ASCII_CAST_WARN QByteArray & replace (

void reserve (
  • intsize)

void resize (
  • intsize)

QByteArray right (
  • intlen)

QByteArray rightJustified (
  • intwidth,
  • charfill,
  • booltruncate )

QByteArray & setNum (
  • short,
  • intbase )

QByteArray & setNum (
  • ushort,
  • intbase )

QByteArray & setNum (
  • int,
  • intbase )

QByteArray & setNum (
  • uint,
  • intbase )

QByteArray & setNum (
  • qlonglong,
  • intbase )

QByteArray & setNum (
  • qulonglong,
  • intbase )

QByteArray & setNum (
  • float,
  • charf,
  • intprec )

QByteArray & setNum (
  • double,
  • charf,
  • intprec )

QByteArray & setRawData (
  • const char *a,
  • uintn )

QByteArray simplified ()

int size ()

QList< QByteArray > split (
  • charsep)

void squeeze ()

bool startsWith (

bool startsWith (
  • charc)

bool startsWith (
  • const char *c)

void swap (

QByteArray toBase64 ()

double toDouble (
  • bool *ok)

float toFloat (
  • bool *ok)

QByteArray toHex ()

int toInt (
  • bool *ok,
  • intbase )

long toLong (
  • bool *ok,
  • intbase )

qlonglong toLongLong (
  • bool *ok,
  • intbase )

QByteArray toLower ()

QByteArray toPercentEncoding (

short toShort (
  • bool *ok,
  • intbase )

uint toUInt (
  • bool *ok,
  • intbase )

ulong toULong (
  • bool *ok,
  • intbase )

qulonglong toULongLong (
  • bool *ok,
  • intbase )

QByteArray toUpper ()

ushort toUShort (
  • bool *ok,
  • intbase )

QByteArray trimmed ()

void truncate (
  • intpos)

Static Public Functions

QByteArray fromBase64 (

QByteArray fromHex (

QByteArray fromPercentEncoding (

QByteArray fromRawData (
  • const char *,
  • intsize )

QByteArray number (
  • int,
  • intbase )

QByteArray number (
  • uint,
  • intbase )

QByteArray number (
  • qlonglong,
  • intbase )

QByteArray number (
  • qulonglong,
  • intbase )

QByteArray number (
  • double,
  • charf,
  • intprec )

Last modified: 2015-07-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus