Details
-
Task
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
-
None
-
5
-
c878a5150 (dev), 9a61bc5df (dev)
-
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, Foundation Sprint 108, Foundation Sprint 109, Foundation Sprint 110, Foundation Sprint 111, Foundation Sprint 112, Foundation Sprint 113, Foundation Sprint 114, Foundation Sprint 115, Foundation Sprint 116, Foundation Sprint 117
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,14 | QLatin1StringMatcher: add indexIn(QStringView) overload | dev | qt/qtbase | Status: MERGED | +2 | 0 |
513852,7 | QStaticLatin1StringMatcher: add indexIn(QStringView) | dev | qt/qtbase | Status: MERGED | +2 | 0 |