- Qt 6.10
- Qt Core
- C++ Classes
- QByteArrayView
- Qt 6.10.2 Reference Documentation

# 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

`(since 6.5, deprecated)` QByteArrayView | left(qsizetype length) const
`(since 6.5, deprecated)` QByteArrayView | mid(qsizetype start, qsizetype length = -1) const
`(since 6.5, deprecated)` QByteArrayView | right(qsizetype length) const

## Member Function Documentation

### `[constexpr, since 6.5, deprecated]` 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(), truncate(), and slice().

### `[constexpr, since 6.5, deprecated]` 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(), truncate(), and slice().

### `[constexpr, since 6.5, deprecated]` 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(), truncate(), and slice().