summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qstringview.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/text/qstringview.h')
-rw-r--r--src/corelib/text/qstringview.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/text/qstringview.h b/src/corelib/text/qstringview.h
index 9578363806f..730134fa5f0 100644
--- a/src/corelib/text/qstringview.h
+++ b/src/corelib/text/qstringview.h
@@ -237,6 +237,11 @@ public:
[[nodiscard]] QStringView trimmed() const noexcept { return QtPrivate::trimmed(*this); }
+ constexpr QStringView &slice(qsizetype pos)
+ { *this = sliced(pos); return *this; }
+ constexpr QStringView &slice(qsizetype pos, qsizetype n)
+ { *this = sliced(pos, n); return *this; }
+
template <typename Needle, typename...Flags>
[[nodiscard]] constexpr inline auto tokenize(Needle &&needle, Flags...flags) const
noexcept(noexcept(qTokenize(std::declval<const QStringView&>(), std::forward<Needle>(needle), flags...)))