Obsolete Members for QByteArrayView
The following members of class QByteArrayView are deprecated. They are provided to keep old source code working. We strongly advise against using them in new code.
Public Functions
(deprecated) QByteArrayView | left(qsizetype length) const |
(deprecated) QByteArrayView | mid(qsizetype start, qsizetype length = -1) const |
(deprecated) QByteArrayView | right(qsizetype length) const |
Member Function Documentation
[constexpr, since 6.5]
QByteArrayView QByteArrayView::left(qsizetype length) const
This function is deprecated. We strongly advise against using it in new code.
Use first() instead in new code.
Returns the subarray of length length starting at position 0 in this object.
The entire byte array view is returned if length is greater than or equal to size(), or less than zero.
This function was introduced in Qt 6.5.
See also first(), last(), sliced(), startsWith(), chopped(), chop(), and truncate().
[constexpr, since 6.5]
QByteArrayView QByteArrayView::mid(qsizetype start, qsizetype length = -1) const
This function is deprecated. We strongly advise against using it in new code.
Use sliced() instead in new code.
Returns the subarray of length length starting at position start in this object.
Returns an empty byte array view if start exceeds the length of the byte array view. If there are less than length characters available in the byte array view starting at start, or if length is negative (default), the function returns all characters that are available from start.
This function was introduced in Qt 6.5.
See also first(), last(), sliced(), chopped(), chop(), and truncate().
[constexpr, since 6.5]
QByteArrayView QByteArrayView::right(qsizetype length) const
This function is deprecated. We strongly advise against using it in new code.
Use last() instead in new code.
Returns the subarray of length length starting at position size() - length in this object.
The entire byte array view is returned if length is greater than or equal to size(), or less than zero.
This function was introduced in Qt 6.5.
See also first(), last(), sliced(), endsWith(), chopped(), chop(), and truncate().
© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.