Obsolete Members for QStringView

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

公共函數

(棄用) QStringView left (qsizetype length ) const
(棄用) QStringView mid (qsizetype start , qsizetype length = -1) const
(棄用) QStringView right (qsizetype length ) const

成員函數文檔編製

[constexpr noexcept, deprecated] QStringView QStringView:: left ( qsizetype length ) const

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

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

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

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

另請參閱 first (), last (), sliced (), startsWith (), chopped (), chop (), truncate (),和 slice ().

[constexpr noexcept, deprecated] QStringView QStringView:: mid ( qsizetype start , qsizetype length = -1) const

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

返迴子字符串長度 length 起始於位置 start 在此對象。

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

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

另請參閱 first (), last (), sliced (), chopped (), chop (), truncate (),和 slice ().

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

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

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

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

另請參閱 first (), last (), sliced (), endsWith (), chopped (), chop (), truncate (),和 slice ().