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
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,8 | QLatin1StringMatcher: add indexIn(QStringView) overload | dev | qt/qtbase | Status: NEW | -1 | 0 |
513852,5 | QStaticLatin1StringMatcher: add indexIn(QStringView) | dev | qt/qtbase | Status: NEW | +2 | 0 |