QStringView::split: doc tidies

QStringView is a borrowed range, so views into it are always valid,
even if the QStringView itself is destroyed. Clarify the comment.
Fix another typo (referring to the view as "string") as well.

Pick-to: 6.2 6.4
Change-Id: I8a4f45494d44d5a47e3c1f764f12c899ad7ee83d
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Giuseppe D'Angelo 2022-11-18 15:22:15 +01:00 committed by Marc Mutz
parent 82eff42b7b
commit 3ccd1d2d83

View File

@ -7827,14 +7827,15 @@ QStringList QString::split(QChar sep, Qt::SplitBehavior behavior, Qt::CaseSensit
\fn QList<QStringView> QStringView::split(QStringView sep, Qt::SplitBehavior behavior, Qt::CaseSensitivity cs) const
Splits the string into substring views wherever \a sep occurs, and
Splits the view into substring views wherever \a sep occurs, and
returns the list of those string views.
See QString::split() for how \a sep, \a behavior and \a cs interact to form
the result.
\note All views are valid as long as this string is. Destroying this
string will cause all views to be dangling pointers.
\note All the returned views are valid as long as the data referenced by
this string view is valid. Destroying the data will cause all views to
become dangling.
\since 6.0
*/