diff options
Diffstat (limited to 'src/corelib/text/qstringview.cpp')
| -rw-r--r-- | src/corelib/text/qstringview.cpp | 43 |
1 files changed, 34 insertions, 9 deletions
diff --git a/src/corelib/text/qstringview.cpp b/src/corelib/text/qstringview.cpp index 29b83ffe8fa..3eb26cdd832 100644 --- a/src/corelib/text/qstringview.cpp +++ b/src/corelib/text/qstringview.cpp @@ -592,7 +592,7 @@ QT_BEGIN_NAMESPACE \a length is negative (default), the function returns all characters that are available from \a start. - \sa first(), last(), sliced(), chopped(), chop(), truncate() + \sa first(), last(), sliced(), chopped(), chop(), truncate(), slice() */ /*! @@ -606,7 +606,7 @@ QT_BEGIN_NAMESPACE The entire string view is returned if \a length is greater than or equal to size(), or less than zero. - \sa first(), last(), sliced(), startsWith(), chopped(), chop(), truncate() + \sa first(), last(), sliced(), startsWith(), chopped(), chop(), truncate(), slice() */ /*! @@ -620,7 +620,7 @@ QT_BEGIN_NAMESPACE The entire string view is returned if \a length is greater than or equal to size(), or less than zero. - \sa first(), last(), sliced(), endsWith(), chopped(), chop(), truncate() + \sa first(), last(), sliced(), endsWith(), chopped(), chop(), truncate(), slice() */ /*! @@ -632,7 +632,7 @@ QT_BEGIN_NAMESPACE \note The behavior is undefined when \a n < 0 or \a n > size(). - \sa last(), sliced(), startsWith(), chopped(), chop(), truncate() + \sa last(), sliced(), startsWith(), chopped(), chop(), truncate(), slice() */ /*! @@ -644,7 +644,7 @@ QT_BEGIN_NAMESPACE \note The behavior is undefined when \a n < 0 or \a n > size(). - \sa first(), sliced(), endsWith(), chopped(), chop(), truncate() + \sa first(), sliced(), endsWith(), chopped(), chop(), truncate(), slice() */ /*! @@ -659,7 +659,7 @@ QT_BEGIN_NAMESPACE or \a pos + \a n > size(). //! [UB-sliced-index-length] - \sa first(), last(), chopped(), chop(), truncate() + \sa first(), last(), chopped(), chop(), truncate(), slice() */ /*! @@ -674,7 +674,32 @@ QT_BEGIN_NAMESPACE \note The behavior is undefined when \a pos < 0 or \a pos > size(). //! [UB-sliced-index-only] - \sa first(), last(), chopped(), chop(), truncate() + \sa first(), last(), chopped(), chop(), truncate(), slice() +*/ + +/*! + \fn QStringView &QStringView::slice(qsizetype pos, qsizetype n) + \since 6.8 + + Modifies this string view to start from position \a pos, extending + for \a n code points. + + \include qstringview.cpp UB-sliced-index-length + + \sa sliced(), first(), last(), chopped(), chop(), truncate() +*/ + +/*! + \fn QStringView &QStringView::slice(qsizetype pos) + \since 6.8 + \overload + + Modifies this string view to start from position \a pos, extending + to its end. + + \include qstringview.cpp UB-sliced-index-only + + \sa sliced(), first(), last(), chopped(), chop(), truncate() */ /*! @@ -687,7 +712,7 @@ QT_BEGIN_NAMESPACE \note The behavior is undefined when \a length < 0 or \a length > size(). - \sa mid(), left(), right(), chop(), truncate() + \sa mid(), left(), right(), chop(), truncate(), slice() */ /*! @@ -711,7 +736,7 @@ QT_BEGIN_NAMESPACE \note The behavior is undefined when \a length < 0 or \a length > size(). - \sa mid(), left(), right(), chopped(), truncate() + \sa mid(), left(), right(), chopped(), truncate(), slice() */ /*! |
