|
| QPcscSlotName (CPtr p) |
|
CPtr | ptr () const noexcept |
|
Ptr | ptr () |
|
constexpr | QByteArray () noexcept |
| Constructs an empty byte array.
|
|
| QByteArray (const char *, qsizetype size=-1) |
| Constructs a byte array containing the first size bytes of array data.
|
|
| QByteArray (qsizetype size, char c) |
| Constructs a byte array of size size with every byte set to ch.
|
|
| QByteArray (qsizetype size, Qt::Initialization) |
| Constructs a byte array of size size with uninitialized contents.
|
|
| QByteArray (const QByteArray &) noexcept |
| Constructs a copy of other.
|
|
| ~QByteArray () |
| Destroys the byte array.
|
|
QByteArray & | operator= (const QByteArray &) noexcept |
| Assigns other to this byte array and returns a reference to this byte array.
|
|
QByteArray & | operator= (const char *str) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Assigns str to this byte array.
|
|
| QByteArray (QByteArray &&other) noexcept=default |
| Move-constructs a QByteArray instance, making it point at the same object that other was pointing to.
|
|
void | swap (QByteArray &other) noexcept |
|
bool | isEmpty () const noexcept |
| Returns true if the byte array has size 0; otherwise returns false .
|
|
void | resize (qsizetype size) |
| Sets the size of the byte array to size bytes.
|
|
void | resize (qsizetype size, char c) |
|
QByteArray & | fill (char c, qsizetype size=-1) |
| Sets every byte in the byte array to ch.
|
|
qsizetype | capacity () const |
| Returns the maximum number of bytes that can be stored in the byte array without forcing a reallocation.
|
|
void | reserve (qsizetype size) |
| Attempts to allocate memory for at least size bytes.
|
|
void | squeeze () |
| Releases any memory not required to store the array's data.
|
|
| operator const char * () const |
|
| operator const void * () const |
|
char * | data () |
| \macro QT_NO_CAST_FROM_BYTEARRAY
|
|
const char * | data () const noexcept |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
|
const char * | constData () const noexcept |
| Returns a pointer to the const data stored in the byte array.
|
|
void | detach () |
|
bool | isDetached () const |
|
bool | isSharedWith (const QByteArray &other) const noexcept |
|
void | clear () |
| Clears the contents of the byte array and makes it null.
|
|
char | at (qsizetype i) const |
| Returns the byte at index position i in the byte array.
|
|
char | operator[] (qsizetype i) const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Same as at(i).
|
|
char & | operator[] (qsizetype i) |
| Returns the byte at index position i as a modifiable reference.
|
|
char | front () const |
|
char & | front () |
|
char | back () const |
|
char & | back () |
|
qsizetype | indexOf (char c, qsizetype from=0) const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns the index position of the start of the first occurrence of the byte ch in this byte array, searching forward from index position from.
|
|
qsizetype | indexOf (QByteArrayView bv, qsizetype from=0) const |
|
qsizetype | lastIndexOf (char c, qsizetype from=-1) const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns the index position of the start of the last occurrence of byte ch in this byte array, searching backward from index position from.
|
|
qsizetype | lastIndexOf (QByteArrayView bv) const |
|
qsizetype | lastIndexOf (QByteArrayView bv, qsizetype from) const |
|
bool | contains (char c) const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns true if the byte array contains the byte ch; otherwise returns false .
|
|
bool | contains (QByteArrayView bv) const |
|
qsizetype | count (char c) const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns the number of occurrences of byte ch in the byte array.
|
|
qsizetype | count (QByteArrayView bv) const |
|
int | compare (QByteArrayView a, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept |
|
QByteArray | left (qsizetype len) const |
| Returns a byte array that contains the first len bytes of this byte array.
|
|
QByteArray | right (qsizetype len) const |
| Returns a byte array that contains the last len bytes of this byte array.
|
|
QByteArray | mid (qsizetype index, qsizetype len=-1) const |
| Returns a byte array containing len bytes from this byte array, starting at position pos.
|
|
QByteArray | first (qsizetype n) const |
|
QByteArray | last (qsizetype n) const |
|
QByteArray | sliced (qsizetype pos) const |
|
QByteArray | sliced (qsizetype pos, qsizetype n) const |
|
QByteArray | chopped (qsizetype len) const |
|
bool | startsWith (QByteArrayView bv) const |
|
bool | startsWith (char c) const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns true if this byte array starts with byte ch; otherwise returns false .
|
|
bool | endsWith (char c) const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns true if this byte array ends with byte ch; otherwise returns false .
|
|
bool | endsWith (QByteArrayView bv) const |
|
bool | isUpper () const |
| Returns true if this byte array is uppercase, that is, if it's identical to its toUpper() folding.
|
|
bool | isLower () const |
| Returns true if this byte array is lowercase, that is, if it's identical to its toLower() folding.
|
|
bool | isValidUtf8 () const noexcept |
| Returns true if this byte array contains valid UTF-8 encoded data, or false otherwise.
|
|
void | truncate (qsizetype pos) |
| Truncates the byte array at index position pos.
|
|
void | chop (qsizetype n) |
| Removes n bytes from the end of the byte array.
|
|
QByteArray | toLower () const & |
|
QByteArray | toLower () && |
|
QByteArray | toUpper () const & |
|
QByteArray | toUpper () && |
|
QByteArray | trimmed () const & |
|
QByteArray | trimmed () && |
|
QByteArray | simplified () const & |
|
QByteArray | simplified () && |
|
QByteArray | leftJustified (qsizetype width, char fill=' ', bool truncate=false) const |
| Returns a byte array of size width that contains this byte array padded with the fill byte.
|
|
QByteArray | rightJustified (qsizetype width, char fill=' ', bool truncate=false) const |
| Returns a byte array of size width that contains the fill byte followed by this byte array.
|
|
QByteArray & | prepend (char c) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Prepends the byte ch to this byte array.
|
|
QByteArray & | prepend (qsizetype count, char c) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
|
QByteArray & | prepend (const char *s) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Prepends the '\0'-terminated string str to this byte array.
|
|
QByteArray & | prepend (const char *s, qsizetype len) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
|
QByteArray & | prepend (const QByteArray &a) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Prepends ba to this byte array.
|
|
QByteArray & | prepend (QByteArrayView a) |
| Prepends the byte array view ba to this byte array and returns a reference to this byte array.
|
|
QByteArray & | append (char c) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Appends the byte ch to this byte array.
|
|
QByteArray & | append (qsizetype count, char c) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
|
QByteArray & | append (const char *s) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Appends the '\0'-terminated string str to this byte array.
|
|
QByteArray & | append (const char *s, qsizetype len) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Appends the first len bytes starting at str to this byte array and returns a reference to this byte array.
|
|
QByteArray & | append (const QByteArray &a) |
| Appends the byte array ba onto the end of this byte array.
|
|
QByteArray & | append (QByteArrayView a) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Appends data to this byte array.
|
|
QByteArray & | assign (QByteArrayView v) |
|
QByteArray & | assign (qsizetype n, char c) |
|
template<typename InputIterator , if_input_iterator< InputIterator > = true> |
QByteArray & | assign (InputIterator first, InputIterator last) |
|
QByteArray & | insert (qsizetype i, QByteArrayView data) |
|
QByteArray & | insert (qsizetype i, const char *s) |
| Inserts s at index position i and returns a reference to this byte array.
|
|
QByteArray & | insert (qsizetype i, const QByteArray &data) |
| Inserts data at index position i and returns a reference to this byte array.
|
|
QByteArray & | insert (qsizetype i, qsizetype count, char c) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
|
QByteArray & | insert (qsizetype i, char c) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Inserts byte ch at index position i in the byte array.
|
|
QByteArray & | insert (qsizetype i, const char *s, qsizetype len) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
|
QByteArray & | remove (qsizetype index, qsizetype len) |
| Removes len bytes from the array, starting at index position pos, and returns a reference to the array.
|
|
QByteArray & | removeAt (qsizetype pos) |
|
QByteArray & | removeFirst () |
|
QByteArray & | removeLast () |
|
template<typename Predicate > |
QByteArray & | removeIf (Predicate pred) |
|
QByteArray & | replace (qsizetype index, qsizetype len, const char *s, qsizetype alen) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Replaces len bytes from index position pos with alen bytes starting at position after.
|
|
QByteArray & | replace (qsizetype index, qsizetype len, QByteArrayView s) |
| Replaces len bytes from index position pos with the byte array after, and returns a reference to this byte array.
|
|
QByteArray & | replace (char before, QByteArrayView after) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Replaces every occurrence of the byte before with the byte array after.
|
|
QByteArray & | replace (const char *before, qsizetype bsize, const char *after, qsizetype asize) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Replaces every occurrence of the bsize bytes starting at before with the asize bytes starting at after.
|
|
QByteArray & | replace (QByteArrayView before, QByteArrayView after) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
|
QByteArray & | replace (char before, char after) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Replaces every occurrence of the byte before with the byte after.
|
|
QByteArray & | operator+= (char c) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Appends the byte ch onto the end of this byte array and returns a reference to this byte array.
|
|
QByteArray & | operator+= (const char *s) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Appends the '\0'-terminated string str onto the end of this byte array and returns a reference to this byte array.
|
|
QByteArray & | operator+= (const QByteArray &a) |
| Appends the byte array ba onto the end of this byte array and returns a reference to this byte array.
|
|
QByteArray & | operator+= (QByteArrayView a) |
|
QList< QByteArray > | split (char sep) const |
| Splits the byte array into subarrays wherever sep occurs, and returns the list of those arrays.
|
|
QByteArray | repeated (qsizetype times) const |
|
QT_ASCII_CAST_WARN bool | operator== (const QString &s2) const |
| Returns true if this byte array is equal to the UTF-8 encoding of str; otherwise returns false .
|
|
QT_ASCII_CAST_WARN bool | operator!= (const QString &s2) const |
| Returns true if this byte array is not equal to the UTF-8 encoding of str; otherwise returns false .
|
|
QT_ASCII_CAST_WARN bool | operator< (const QString &s2) const |
| Returns true if this byte array is lexically less than the UTF-8 encoding of str; otherwise returns false .
|
|
QT_ASCII_CAST_WARN bool | operator> (const QString &s2) const |
| Returns true if this byte array is lexically greater than the UTF-8 encoding of str; otherwise returns false .
|
|
QT_ASCII_CAST_WARN bool | operator<= (const QString &s2) const |
| Returns true if this byte array is lexically less than or equal to the UTF-8 encoding of str; otherwise returns false .
|
|
QT_ASCII_CAST_WARN bool | operator>= (const QString &s2) const |
| Returns true if this byte array is greater than or equal to the UTF-8 encoding of str; otherwise returns false .
|
|
short | toShort (bool *ok=nullptr, int base=10) const |
| Returns the byte array converted to a short using base base, which is ten by default.
|
|
ushort | toUShort (bool *ok=nullptr, int base=10) const |
| Returns the byte array converted to an {unsigned short} using base base, which is ten by default.
|
|
int | toInt (bool *ok=nullptr, int base=10) const |
| Returns the byte array converted to an int using base base, which is ten by default.
|
|
uint | toUInt (bool *ok=nullptr, int base=10) const |
| Returns the byte array converted to an {unsigned int} using base base, which is ten by default.
|
|
long | toLong (bool *ok=nullptr, int base=10) const |
|
ulong | toULong (bool *ok=nullptr, int base=10) const |
|
qlonglong | toLongLong (bool *ok=nullptr, int base=10) const |
| Returns the byte array converted to a {long long} using base base, which is ten by default.
|
|
qulonglong | toULongLong (bool *ok=nullptr, int base=10) const |
| Returns the byte array converted to an {unsigned long long} using base base, which is ten by default.
|
|
float | toFloat (bool *ok=nullptr) const |
| Returns the byte array converted to a float value.
|
|
double | toDouble (bool *ok=nullptr) const |
| Returns the byte array converted to a double value.
|
|
QByteArray | toBase64 (Base64Options options=Base64Encoding) const |
|
QByteArray | toHex (char separator='\0') const |
| Returns a hex encoded copy of the byte array.
|
|
QByteArray | toPercentEncoding (const QByteArray &exclude=QByteArray(), const QByteArray &include=QByteArray(), char percent='%') const |
|
QByteArray | percentDecoded (char percent='%') const |
|
QByteArray & | setNum (short, int base=10) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
|
QByteArray & | setNum (ushort, int base=10) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
|
QByteArray & | setNum (int, int base=10) |
| Represent the whole number n as text.
|
|
QByteArray & | setNum (uint, int base=10) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
|
QByteArray & | setNum (long, int base=10) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
|
QByteArray & | setNum (ulong, int base=10) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
|
QByteArray & | setNum (qlonglong, int base=10) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
|
QByteArray & | setNum (qulonglong, int base=10) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
|
QByteArray & | setNum (float, char format='g', int precision=6) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Represent the floating-point number n as text.
|
|
QByteArray & | setNum (double, char format='g', int precision=6) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Represent the floating-point number n as text.
|
|
QByteArray & | setRawData (const char *a, qsizetype n) |
|
iterator | begin () |
| Returns an \l{STL-style iterators}{STL-style iterator} pointing to the first byte in the byte-array.
|
|
const_iterator | begin () const noexcept |
|
const_iterator | cbegin () const noexcept |
|
const_iterator | constBegin () const noexcept |
| Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first byte in the byte-array.
|
|
iterator | end () |
| Returns an \l{STL-style iterators}{STL-style iterator} pointing just after the last byte in the byte-array.
|
|
const_iterator | end () const noexcept |
|
const_iterator | cend () const noexcept |
|
const_iterator | constEnd () const noexcept |
| Returns a const \l{STL-style iterators}{STL-style iterator} pointing just after the last byte in the byte-array.
|
|
reverse_iterator | rbegin () |
|
reverse_iterator | rend () |
|
const_reverse_iterator | rbegin () const noexcept |
|
const_reverse_iterator | rend () const noexcept |
|
const_reverse_iterator | crbegin () const noexcept |
|
const_reverse_iterator | crend () const noexcept |
|
void | push_back (char c) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Same as append(ch).
|
|
void | push_back (const char *s) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Same as append(str).
|
|
void | push_back (const QByteArray &a) |
| This function is provided for STL compatibility.
|
|
void | push_back (QByteArrayView a) |
|
void | push_front (char c) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Same as prepend(ch).
|
|
void | push_front (const char *c) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Same as prepend(str).
|
|
void | push_front (const QByteArray &a) |
| This function is provided for STL compatibility.
|
|
void | push_front (QByteArrayView a) |
|
void | shrink_to_fit () |
|
iterator | erase (const_iterator first, const_iterator last) |
|
iterator | erase (const_iterator it) |
|
std::string | toStdString () const |
|
qsizetype | size () const noexcept |
| Returns the number of bytes in this byte array.
|
|
qsizetype | length () const noexcept |
| Same as size().
|
|
bool | isNull () const noexcept |
| Returns true if this byte array is null; otherwise returns false .
|
|
DataPointer & | data_ptr () |
|
| QByteArray (DataPointer &&dd) |
|
|
char * | qstrdup (const char *src) |
| Returns a duplicate string.
|
|
char * | qstrcpy (char *dst, const char *src) |
| Copies all the characters up to and including the '\0' from src into dst and returns a pointer to dst.
|
|
char * | qstrncpy (char *dst, const char *src, size_t len) |
| A safe strncpy() function.
|
|
size_t | qstrlen (const char *str) |
| A safe strlen() function.
|
|
size_t | qstrnlen (const char *str, size_t maxlen) |
|
int | qstrcmp (const char *str1, const char *str2) |
| A safe strcmp() function.
|
|
int | qstrncmp (const char *str1, const char *str2, size_t len) |
| A safe strncmp() function.
|
|
int | qstricmp (const char *str1, const char *str2) |
| A safe stricmp() function.
|
|
int | qstrnicmp (const char *str1, const char *str2, size_t len) |
| A safe strnicmp() function.
|
|
quint16 | qChecksum (QByteArrayView data, Qt::ChecksumType standard) |
|
QByteArray | qCompress (const QByteArray &data, int compressionLevel) |
| Compresses the data byte array and returns the compressed data in a new byte array.
|
|
QByteArray | qCompress (const uchar *data, qsizetype nbytes, int compressionLevel) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Compresses the first nbytes of data at compression level compressionLevel and returns the compressed data in a new byte array.
|
|
QByteArray | qUncompress (const QByteArray &data) |
| Uncompresses the data byte array and returns a new byte array with the uncompressed data.
|
|
QByteArray | qUncompress (const uchar *data, qsizetype nbytes) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Uncompresses the first nbytes of data and returns a new byte array with the uncompressed data.
|
|
char * | data () |
| \macro QT_NO_CAST_FROM_BYTEARRAY
|
|
QDataStream & | operator<< (QDataStream &out, const QByteArray &ba) |
| Writes byte array ba to the stream out and returns a reference to the stream.
|
|
QDataStream & | operator>> (QDataStream &in, QByteArray &ba) |
| Reads a byte array into ba from the stream in and returns a reference to the stream.
|
|
QByteArray | operator+ (const QByteArray &a1, const QByteArray &a2) |
| Returns a byte array that is the result of concatenating byte array a1 and byte array a2.
|
|
QByteArray | operator+ (const QByteArray &a1, const char *a2) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns a byte array that is the result of concatenating byte array a1 and '\0'-terminated string a2.
|
|
QByteArray | operator+ (const QByteArray &a1, char a2) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns a byte array that is the result of concatenating byte array a1 and byte a2.
|
|
QByteArray | operator+ (const char *a1, const QByteArray &a2) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns a byte array that is the result of concatenating '\0'-terminated string a1 and byte array a2.
|
|
QByteArray | operator+ (char a1, const QByteArray &a2) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns a byte array that is the result of concatenating byte a1 and byte array a2.
|
|
| operator""_ba (const char *str, size_t size) |
| \macro QByteArrayLiteral(ba)
|
|
template< typename T > qsizetype | erase (QByteArray &ba, const T &t) |
|
template< typename Predicate > qsizetype | erase_if (QByteArray &ba, Predicate pred) |
|
QT_BEGIN_NAMESPACE int | qvsnprintf (char *str, size_t n, const char *fmt, va_list ap) |
| A portable vsnprintf() function.
|
|
int | qsnprintf (char *str, size_t n, const char *fmt,...) |
| \target bytearray-qsnprintf
|
|