QByteArrayList 類

QByteArrayList 類提供字節數組列錶。 更多...

頭: #include <QByteArrayList>
CMake: find_package(Qt6 REQUIRED COMPONENTS Core)
target_link_libraries(mytarget PRIVATE Qt6::Core)
qmake: QT += core
繼承: QList

注意: 此類的所有函數 可重入 .

公共函數

QByteArray join (QByteArrayView separator = {}) const
QByteArray join (const QByteArray & separator ) const
QByteArray join (char separator ) const
QByteArrayListIterator
QMutableByteArrayListIterator

詳細描述

QByteArrayList 實際僅僅是 QList < QByteArray >. It is documented as a full class just for simplicity of documenting the member methods that exist only in QList < QByteArray >.

所有的 QList 's functionality also applies to QByteArrayList. For example, you can use isEmpty () 來測試列錶是否為空,可以調用函數像 append (), prepend (), insert (), replace (), removeAll (), removeAt (), removeFirst (), removeLast (),和 removeOne () to modify a QByteArrayList. In addition, QByteArrayList provides several join () methods for concatenating the list into a single QByteArray .

The purpose of QByteArrayList is quite different from that of QStringList . Whereas QStringList has many methods for manipulation of elements within the list, QByteArrayList does not. Normally, QStringList should be used whenever working with a list of printable strings. QByteArrayList should be used to handle and efficiently join large blobs of binary data, as when sequentially receiving serialized data through a QIODevice .

另請參閱 QByteArray and QStringList .

成員函數文檔編製

[since 6.3] QByteArray QByteArrayList:: join ( QByteArrayView separator = {}) const

Joins all the byte arrays into a single byte array with each element separated by the given separator ,若有的話。

This function was introduced in Qt 6.3.

QByteArray QByteArrayList:: join (const QByteArray & separator ) const

Joins all the byte arrays into a single byte array with each element separated by the given separator .

QByteArray QByteArrayList:: join ( char separator ) const

Joins all the byte arrays into a single byte array with each element separated by the given separator .

相關非成員

QByteArrayListIterator

The QByteArrayListIterator type definition provides a Java-style const iterator for QByteArrayList .

QByteArrayList provides both Java 風格迭代器 and STL 樣式迭代器 . The Java-style const iterator is simply a type definition for QListIterator < QByteArray >.

另請參閱 QMutableByteArrayListIterator and QByteArrayList::const_iterator .

QMutableByteArrayListIterator

The QByteArrayListIterator type definition provides a Java-style non-const iterator for QByteArrayList .

QByteArrayList provides both Java 風格迭代器 and STL 樣式迭代器 . The Java-style non-const iterator is simply a type definition for QMutableListIterator < QByteArray >.

另請參閱 QByteArrayListIterator and QByteArrayList::iterator .