Details
-
Task
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
-
None
-
5
-
Foundation Sprint 91, Foundation Sprint 92, Foundation Sprint 93, Foundations Sprint 94, Foundations Sprint 95, Foundations Sprint 96, Foundations Sprint 97, Foundations Sprint 98, Foundations Sprint 99, Foundation Sprint 100, Foundation Sprint 101, Foundations Sprint 102, Foundation Sprint 103, Foundation Sprint 104, Foundation Sprint 105, Foundation Sprint 106, Foundation Sprint 107
Description
The QLatin1StringMatcher can search for a QLatin1StringView needle inside a QLatin1StringView haystack. It is a low hanging fruit to add support to search inside a QStringView or QString haystack as well. The building of the skip table remains unchanged, only two new trivial indexIn functions and possibly a tweaked Boyer-Moore search function needs to be added.
The advantage is that we no longer have to convert the needle into a QString which is needed to use the similar QStringMatcher.
If we add support for this in the constexpr QStaticLatin1StringMatcher as well, we can search through a QString/QStringView with a compile time computed skip table. A constexpr QString searcher does not exist, so this will be a major benefit.
Attachments
Gerrit Reviews
For Gerrit Dashboard: QTBUG-117054 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
504484,13 | QLatin1StringMatcher: add indexIn(QStringView) overload | dev | qt/qtbase | Status: NEW | 0 | 0 |
513852,6 | QStaticLatin1StringMatcher: add indexIn(QStringView) | dev | qt/qtbase | Status: NEW | -1 | 0 |