Obsolete Members for QAnyStringView

以下成員源於類 QAnyStringView 被棄用。 提供它們是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它們。

公共函數

(since 6.5, deprecated) QAnyStringView left (qsizetype n ) const
(since 6.5, deprecated) QAnyStringView mid (qsizetype pos , qsizetype n = -1) const
(since 6.5, deprecated) QAnyStringView right (qsizetype n ) const

成員函數文檔編製

[constexpr, since 6.5, deprecated] QAnyStringView QAnyStringView:: left ( qsizetype n ) const

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

使用 first () 取而代之在新代碼中。

返迴子字符串長度 n starting at position 0 in this object.

The entire string view is returned if n >= size (),或小於 0。

該函數在 Qt 6.5 引入。

另請參閱 first (), last (), sliced (), chopped (), chop (), truncate (), slice (),和 大小和子字符串 .

[constexpr, since 6.5, deprecated] 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 () 取而代之在新代碼中。

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 (), slice (),和 大小和子字符串 .

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

使用 last () 取而代之在新代碼中。

返迴子字符串長度 n 起始於位置 size () - n 在此對象。

The entire string view is returned if n >= size (),或小於 0。

該函數在 Qt 6.5 引入。

另請參閱 first (), last (), sliced (), chopped (), chop (), truncate (), slice (),和 大小和子字符串 .