diff options
author | Anton Kudryavtsev <anton.kudryavtsev@corp.mail.ru> | 2019-04-02 16:24:44 +0300 |
---|---|---|
committer | Anton Kudryavtsev <anton.kudryavtsev@corp.mail.ru> | 2019-06-18 14:48:50 +0300 |
commit | 55240bcdf3cc1d6ac357e5007748378c6bf1d7f1 (patch) | |
tree | 18dbc042c56e83b022efb848c22c0c32cc954bcb /src/corelib/tools/qstringalgorithms.h | |
parent | eed9a8fbd300dafb2802b6c09c018fbda4e13ef1 (diff) |
QStringView, QLatin1String: add lastIndexOf methods
While touching the code, factor out internal methods
to avoid needlees latin1->utf16 conversion.
[ChangeLog][QtCore][QLatin1String] Added lastIndexOf().
[ChangeLog][QtCore][QStringView] Added lastIndexOf().
Change-Id: I1c624f00e4ed10111e0d00b86daff7904eeed176
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qstringalgorithms.h')
-rw-r--r-- | src/corelib/tools/qstringalgorithms.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/tools/qstringalgorithms.h b/src/corelib/tools/qstringalgorithms.h index 51a86cfeb5..2b480b1e4c 100644 --- a/src/corelib/tools/qstringalgorithms.h +++ b/src/corelib/tools/qstringalgorithms.h @@ -80,6 +80,11 @@ Q_REQUIRED_RESULT Q_CORE_EXPORT Q_DECL_PURE_FUNCTION qsizetype findString(QStrin Q_REQUIRED_RESULT Q_CORE_EXPORT Q_DECL_PURE_FUNCTION qsizetype findString(QLatin1String haystack, qsizetype from, QStringView needle, Qt::CaseSensitivity cs = Qt::CaseSensitive) noexcept; Q_REQUIRED_RESULT Q_CORE_EXPORT Q_DECL_PURE_FUNCTION qsizetype findString(QLatin1String haystack, qsizetype from, QLatin1String needle, Qt::CaseSensitivity cs = Qt::CaseSensitive) noexcept; +Q_REQUIRED_RESULT Q_CORE_EXPORT Q_DECL_PURE_FUNCTION qsizetype lastIndexOf(QStringView haystack, qsizetype from, QStringView needle, Qt::CaseSensitivity cs = Qt::CaseSensitive) noexcept; +Q_REQUIRED_RESULT Q_CORE_EXPORT Q_DECL_PURE_FUNCTION qsizetype lastIndexOf(QStringView haystack, qsizetype from, QLatin1String needle, Qt::CaseSensitivity cs = Qt::CaseSensitive) noexcept; +Q_REQUIRED_RESULT Q_CORE_EXPORT Q_DECL_PURE_FUNCTION qsizetype lastIndexOf(QLatin1String haystack, qsizetype from, QStringView needle, Qt::CaseSensitivity cs = Qt::CaseSensitive) noexcept; +Q_REQUIRED_RESULT Q_CORE_EXPORT Q_DECL_PURE_FUNCTION qsizetype lastIndexOf(QLatin1String haystack, qsizetype from, QLatin1String needle, Qt::CaseSensitivity cs = Qt::CaseSensitive) noexcept; + Q_REQUIRED_RESULT Q_CORE_EXPORT Q_DECL_PURE_FUNCTION QStringView trimmed(QStringView s) noexcept; Q_REQUIRED_RESULT Q_CORE_EXPORT Q_DECL_PURE_FUNCTION QLatin1String trimmed(QLatin1String s) noexcept; |