Obsolete Members for QStringView
The following members of class QStringView are deprecated. They are provided to keep old source code working. We strongly advise against using them in new code.
Public Functions
(deprecated) QStringView | left(qsizetype length) const |
(deprecated) QStringView | mid(qsizetype start, qsizetype length = -1) const |
(deprecated) QStringView | right(qsizetype length) const |
Member Function Documentation
[constexpr noexcept, deprecated]
QStringView QStringView::left(qsizetype length) const
This function is deprecated. We strongly advise against using it in new code.
Use first() instead in new code.
Returns the substring of length length starting at position 0 in this object.
The entire string view is returned if length is greater than or equal to size(), or less than zero.
See also first(), last(), sliced(), startsWith(), chopped(), chop(), and truncate().
[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.
Returns the substring of length length starting at position start in this object.
Use sliced() instead in new code.
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, or if length is negative (default), the function returns all characters that are available from start.
See also first(), last(), sliced(), chopped(), chop(), and truncate().
[constexpr noexcept, deprecated]
QStringView QStringView::right(qsizetype length) const
This function is deprecated. We strongly advise against using it in new code.
Use last() instead in new code.
Returns the substring of length length starting at position size() - length in this object.
The entire string view is returned if length is greater than or equal to size(), or less than zero.
See also first(), last(), sliced(), endsWith(), chopped(), chop(), and truncate().