summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qstringalgorithms.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2018-05-15 14:13:24 -0700
committerThiago Macieira <thiago.macieira@intel.com>2018-08-03 20:26:56 +0000
commitdc8d4fe30f2f88982166b5c593f90deb3964fb52 (patch)
tree8f5b2e08e2bdc0248e09b6f5af8a9c8f3d6851c5 /src/corelib/tools/qstringalgorithms.h
parent98dda3f5ac8e96fe34a343b4fc8cab1dc6939513 (diff)
QUrl: Add qustrchr() and use it to speed up the fast URL full decoding
The character search in the findChar() static function in qstring.cpp is more efficient than what we had in qurlrecode.cpp and there's no point in duplicating it. It also has a Neon implementation. So make the implementation available for use in QtPrivate::qustrchr(). This also simplifies the implementation. Change-Id: Ib48364abee9f464c96c6fffd152eedd0cd8ad7f8 Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qstringalgorithms.h')
-rw-r--r--src/corelib/tools/qstringalgorithms.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/tools/qstringalgorithms.h b/src/corelib/tools/qstringalgorithms.h
index 8446d85239..cc0eda71f3 100644
--- a/src/corelib/tools/qstringalgorithms.h
+++ b/src/corelib/tools/qstringalgorithms.h
@@ -56,6 +56,7 @@ template <typename T> class QVector;
namespace QtPrivate {
Q_REQUIRED_RESULT Q_CORE_EXPORT Q_DECL_PURE_FUNCTION qsizetype qustrlen(const ushort *str) Q_DECL_NOTHROW;
+Q_REQUIRED_RESULT Q_CORE_EXPORT Q_DECL_PURE_FUNCTION const ushort *qustrchr(QStringView str, ushort ch) noexcept;
Q_REQUIRED_RESULT Q_CORE_EXPORT Q_DECL_PURE_FUNCTION int compareStrings(QStringView lhs, QStringView rhs, Qt::CaseSensitivity cs = Qt::CaseSensitive) Q_DECL_NOTHROW;
Q_REQUIRED_RESULT Q_CORE_EXPORT Q_DECL_PURE_FUNCTION int compareStrings(QStringView lhs, QLatin1String rhs, Qt::CaseSensitivity cs = Qt::CaseSensitive) Q_DECL_NOTHROW;