Obsolete Members for QAnyStringView

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

公共函数

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

成员函数文档编制

[constexpr, since 6.5] QAnyStringView QAnyStringView:: 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.

该函数在 Qt 6.5 引入。

另请参阅 first (), last (), sliced (), chopped (), chop (), truncate (),和 大小和子字符串 .

[constexpr, since 6.5] QAnyStringView QAnyStringView:: 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 .

该函数在 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.

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

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

该函数在 Qt 6.5 引入。

另请参阅 first (), last (), sliced (), chopped (), chop (), truncate (),和 大小和子字符串 .