Obsolete Members for QStringView
クラスQStringView の以下のメンバーは非推奨です。これらは古いソース・コードの動作を維持するために提供されています。新しいコードでは使用しないことを強くお勧めします。
パブリック関数
(deprecated) QStringView | left(qsizetype length) const |
(deprecated) QStringView | mid(qsizetype start, qsizetype length = -1) const |
(deprecated) QStringView | right(qsizetype length) const |
メンバ関数ドキュメント
[constexpr noexcept, deprecated]
QStringView QStringView::left(qsizetype length) const
この関数は非推奨である。新しいコードでは使用しないことを強く推奨する。
新しいコードでは、代わりにfirst() を使用してください。
このオブジェクトの位置 0 から始まる長さlength の部分文字列を返します。
length がsize() より大きいか等しいか、0 より小さい場合は、文字列ビュー全体が返される。
first()、last()、sliced()、startsWith()、chopped()、chop()、truncate()、slice()も参照 。
[constexpr noexcept, deprecated]
QStringView QStringView::mid(qsizetype start, qsizetype length = -1) const
この関数は非推奨である。新しいコードでは使用しないことを強くお勧めします。
このオブジェクトの位置start から始まる長さlength の部分文字列を返します。
新しいコードでは、代わりにsliced() を使用してください。
start が文字列ビューの長さを超える場合は、空の文字列ビューを返します。start から始まる文字列ビューで使用可能な文字がlength 未満の場合、またはlength が負(デフォルト)の場合、この関数はstart から使用可能なすべての文字を返します。
first()、last()、sliced()、chopped()、chop()、truncate()、slice()も参照 。
[constexpr noexcept, deprecated]
QStringView QStringView::right(qsizetype length) const
この関数は非推奨である。新しいコードでは使用しないことを強く推奨する。
新しいコードでは、代わりにlast() を使用してください。
このオブジェクトの位置size() -length から始まる長さlength の部分文字列を返します。
length がsize() 以上、または 0 以下の場合は、文字列ビュー全体が返されます。
first()、last()、sliced()、endsWith()、chopped()、chop()、truncate()、slice()も参照 。
© 2025 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.