Obsolete Members for QUtf8StringView

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

公共函数

(弃用) QUtf8StringView left (qsizetype n ) const
(弃用) QUtf8StringView mid (qsizetype pos , qsizetype n = -1) const
(弃用) QUtf8StringView right (qsizetype n ) const

成员函数文档编制

[constexpr] QUtf8StringView QUtf8StringView:: left ( qsizetype n ) const

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

使用 first () instead in new code.

返回子字符串长度 n starting at position 0 in this object.

The entire string view is returned if n is greater than or equal to size (), or less than zero.

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

[constexpr] QUtf8StringView QUtf8StringView:: mid ( qsizetype pos , qsizetype n = -1) const

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

返回子字符串长度 n 始于位置 pos 在此对象。

使用 sliced () instead in new code.

Returns an empty string view if n exceeds the length of the string view. If there are less than n code points available in the string view starting at pos ,或者若 n is negative (default), the function returns all code points that are available from pos .

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

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

使用 last () instead in new code.

返回子字符串长度 n 始于位置 size () - n 在此对象。

The entire string view is returned if n is greater than or equal to size (), or less than zero.

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