Obsolete Members for QByteArrayView

以下成员源于类 QByteArrayView 被弃用。 提供它们是为使旧源代码能继续工作。强烈建议不要在新代码中使用它们。

公共函数

(弃用) QByteArrayView left (qsizetype length ) const
(弃用) QByteArrayView mid (qsizetype start , qsizetype length = -1) const
(弃用) QByteArrayView right (qsizetype length ) const

成员函数文档编制

[constexpr, since 6.5] QByteArrayView QByteArrayView:: left ( qsizetype length ) const

This function is deprecated. We strongly advise against using it in new code.

使用 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.

该函数在 Qt 6.5 引入。

另请参阅 first (), last (), sliced (), startsWith (), chopped (), chop (),和 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.

使用 sliced () instead in new code.

Returns the subarray of length length 始于位置 start 在此对象。

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 ,或者若 length is negative (default), the function returns all characters that are available from start .

该函数在 Qt 6.5 引入。

另请参阅 first (), last (), sliced (), chopped (), chop (),和 truncate ().

This function is deprecated. We strongly advise against using it in new code.

使用 last () instead in new code.

Returns the subarray of length length 始于位置 size () - length 在此对象。

The entire byte array view is returned if length is greater than or equal to size (), or less than zero.

该函数在 Qt 6.5 引入。

另请参阅 first (), last (), sliced (), endsWith (), chopped (), chop (),和 truncate ().