summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qstringview.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2017-01-31 00:36:54 +0100
committerMarc Mutz <marc.mutz@kdab.com>2017-03-31 11:23:59 +0000
commit0b9fb15b1a9bd9b5c8658e38c753343ff7ecd390 (patch)
treee4311674dd4268f36419ed6d55619e9d0d9eeb50 /src/corelib/tools/qstringview.cpp
parent54dd87ca0f331180382c81d78d431db5570175d6 (diff)
QStringView: add mid(), left(), right()
Change-Id: If1d2cf175d51b3c02881e21937b0a2d33b78aadd Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/corelib/tools/qstringview.cpp')
-rw-r--r--src/corelib/tools/qstringview.cpp46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/corelib/tools/qstringview.cpp b/src/corelib/tools/qstringview.cpp
index fe00965a5c..ec77e11740 100644
--- a/src/corelib/tools/qstringview.cpp
+++ b/src/corelib/tools/qstringview.cpp
@@ -548,4 +548,50 @@ QT_BEGIN_NAMESPACE
\sa back(), front(), first()
*/
+/*!
+ \fn QStringView QStringView::mid(size_type start) const
+
+ Returns the substring starting at position \a start in this object,
+ and extending to the end of the string.
+
+ \note The behavior is undefined when \a start < 0 or \a start > size().
+
+ \sa left(), right()
+*/
+
+/*!
+ \fn QStringView QStringView::mid(size_type start, size_type length) const
+ \overload
+
+ Returns the substring of length \a length starting at position
+ \a start in this object.
+
+ \note The behavior is undefined when \a start < 0, \a length < 0,
+ or \a start + \a length > size().
+
+ \sa left(), right()
+*/
+
+/*!
+ \fn QStringView QStringView::left(size_type length) const
+
+ Returns the substring of length \a length starting at position
+ 0 in this object.
+
+ \note The behavior is undefined when \a length < 0 or \a length > size().
+
+ \sa mid(), right()
+*/
+
+/*!
+ \fn QStringView QStringView::right(size_type length) const
+
+ Returns the substring of length \a length starting at position
+ size() - \a length in this object.
+
+ \note The behavior is undefined when \a length < 0 or \a length > size().
+
+ \sa mid(), left()
+*/
+
QT_END_NAMESPACE