Obsolete Members for QUtf8StringView

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

公共函数

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

成员函数文档编制

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 is returned if n is greater than or equal to size (), or less than zero.

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

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. If there are less than n code points available in the string starting at pos ,或者若 n is negative (default), the function returns all code points that are available from pos .

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

QUtf8StringView QUtf8StringView:: right ( qsizetype n ) const

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

使用 last () instead in new code.

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

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

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