diff options
-rw-r--r-- | src/corelib/text/qregularexpression.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/text/qregularexpression.h b/src/corelib/text/qregularexpression.h index b588dbf384..142ec7f838 100644 --- a/src/corelib/text/qregularexpression.h +++ b/src/corelib/text/qregularexpression.h @@ -95,6 +95,7 @@ public: QString pattern() const; void setPattern(const QString &pattern); + [[nodiscard]] bool isValid() const; qsizetype patternErrorOffset() const; QString errorString() const; @@ -118,21 +119,25 @@ public: }; Q_DECLARE_FLAGS(MatchOptions, MatchOption) + [[nodiscard]] QRegularExpressionMatch match(const QString &subject, qsizetype offset = 0, MatchType matchType = NormalMatch, MatchOptions matchOptions = NoMatchOption) const; + [[nodiscard]] QRegularExpressionMatch match(QStringView subjectView, qsizetype offset = 0, MatchType matchType = NormalMatch, MatchOptions matchOptions = NoMatchOption) const; + [[nodiscard]] QRegularExpressionMatchIterator globalMatch(const QString &subject, qsizetype offset = 0, MatchType matchType = NormalMatch, MatchOptions matchOptions = NoMatchOption) const; + [[nodiscard]] QRegularExpressionMatchIterator globalMatch(QStringView subjectView, qsizetype offset = 0, MatchType matchType = NormalMatch, |