diff options
Diffstat (limited to 'src/corelib/text/qstringalgorithms.h')
-rw-r--r-- | src/corelib/text/qstringalgorithms.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/corelib/text/qstringalgorithms.h b/src/corelib/text/qstringalgorithms.h index 6d8fe114f1..870ae42af8 100644 --- a/src/corelib/text/qstringalgorithms.h +++ b/src/corelib/text/qstringalgorithms.h @@ -70,6 +70,8 @@ class QStringView; template <bool> class QBasicUtf8StringView; class QAnyStringView; class QChar; +class QRegularExpression; +class QRegularExpressionMatch; namespace QtPrivate { @@ -122,6 +124,21 @@ namespace QtPrivate { [[nodiscard]] Q_CORE_EXPORT Q_DECL_PURE_FUNCTION qsizetype count(QStringView haystack, QChar needle, Qt::CaseSensitivity cs = Qt::CaseSensitive) noexcept; [[nodiscard]] Q_CORE_EXPORT Q_DECL_PURE_FUNCTION qsizetype count(QStringView haystack, QStringView needle, Qt::CaseSensitivity cs = Qt::CaseSensitive) noexcept; +#if QT_CONFIG(regularexpression) +[[nodiscard]] Q_CORE_EXPORT qsizetype indexOf(QStringView haystack, + const QRegularExpression &re, + qsizetype from = 0, + QRegularExpressionMatch *rmatch = nullptr); +[[nodiscard]] Q_CORE_EXPORT qsizetype lastIndexOf(QStringView haystack, + const QRegularExpression &re, + qsizetype from = -1, + QRegularExpressionMatch *rmatch = nullptr); +[[nodiscard]] Q_CORE_EXPORT bool contains(QStringView haystack, + const QRegularExpression &re, + QRegularExpressionMatch *rmatch = nullptr); +[[nodiscard]] Q_CORE_EXPORT qsizetype count(QStringView haystack, const QRegularExpression &re); +#endif + [[nodiscard]] Q_CORE_EXPORT QString convertToQString(QAnyStringView s); [[nodiscard]] Q_CORE_EXPORT QByteArray convertToLatin1(QStringView str); |