diff options
Diffstat (limited to 'src/corelib/text/qstringview.h')
-rw-r--r-- | src/corelib/text/qstringview.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/corelib/text/qstringview.h b/src/corelib/text/qstringview.h index df05fce252..42935440f3 100644 --- a/src/corelib/text/qstringview.h +++ b/src/corelib/text/qstringview.h @@ -71,6 +71,7 @@ QT_BEGIN_NAMESPACE class QString; class QStringView; class QRegularExpression; +class QRegularExpressionMatch; namespace QtPrivate { template <typename Char> @@ -347,6 +348,25 @@ public: { return QtPrivate::lastIndexOf(*this, from, s, cs); } [[nodiscard]] inline qsizetype lastIndexOf(QLatin1String s, qsizetype from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const noexcept; +#if QT_CONFIG(regularexpression) + [[nodiscard]] qsizetype indexOf(const QRegularExpression &re, qsizetype from = 0, QRegularExpressionMatch *rmatch = nullptr) const + { + return QtPrivate::indexOf(*this, re, from, rmatch); + } + [[nodiscard]] qsizetype lastIndexOf(const QRegularExpression &re, qsizetype from = -1, QRegularExpressionMatch *rmatch = nullptr) const + { + return QtPrivate::lastIndexOf(*this, re, from, rmatch); + } + [[nodiscard]] bool contains(const QRegularExpression &re, QRegularExpressionMatch *rmatch = nullptr) const + { + return QtPrivate::contains(*this, re, rmatch); + } + [[nodiscard]] qsizetype count(const QRegularExpression &re) const + { + return QtPrivate::count(*this, re); + } +#endif + [[nodiscard]] bool isRightToLeft() const noexcept { return QtPrivate::isRightToLeft(*this); } [[nodiscard]] bool isValidUtf16() const noexcept |