Obsolete Members for QStringView
QStringView クラスの以下のメンバーは非推奨となっています。これらは、古いソースコードが動作し続けるようにするために提供されています。新しいコードでの使用は強く推奨しません。
パブリック関数
(deprecated in 6.0) QStringView | left(qsizetype length) const |
(deprecated in 6.0) QStringView | mid(qsizetype start, qsizetype length = -1) const |
(deprecated in 6.0) QStringView | right(qsizetype length) const |
メンバー関数のドキュメント
[constexpr noexcept, deprecated in 6.0] QStringView QStringView::left(qsizetype length) const
この関数はバージョン 6.0 以降、非推奨となっています。新しいコードでの使用は強く推奨しません。
新しいコードでは、代わりに `first()` を使用してください。
このオブジェクトの 0 番目の位置から、length の長さの部分文字列を返します。
length がsize() 以上、または 0 未満の場合、文字列ビュー全体が返されます。
関連項目: first()、last()、sliced()、startsWith()、chopped()、chop()、truncate()、およびslice()。
[constexpr noexcept, deprecated in 6.0] QStringView QStringView::mid(qsizetype start, qsizetype length = -1) const
この関数はバージョン 6.0 以降、非推奨となっています。新しいコードでの使用は強く推奨しません。
このオブジェクトのstart の位置から、長さlength の部分文字列を返します。
新しいコードでは、代わりに `sliced()` を使用してください。
start が文字列ビューの長さを超える場合、空の文字列ビューを返します。start から始まる文字列ビューで利用可能な文字数がlength 未満である場合、またはlength が負の数(デフォルト)である場合、この関数はstart から利用可能なすべての文字を返します。
関連項目: first()、last()、sliced()、chopped()、chop()、truncate()、およびslice()。
[constexpr noexcept, deprecated in 6.0] QStringView QStringView::right(qsizetype length) const
この関数はバージョン 6.0 以降、非推奨となっています。新しいコードでの使用は強く推奨しません。
新しいコードでは、代わりに `last()` を使用してください。
このオブジェクトにおいて、位置size() からlength までの、長さlength の部分文字列を返します。
length がsize() 以上、または 0 未満の場合、文字列ビュー全体が返されます。
first()、last()、sliced()、endsWith()、chopped()、chop()、truncate()、およびslice()も参照してください 。
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.