qt5base-lts/tests/auto/corelib/text/qstringmatcher
Ahmad Samir 341854a4f3 QStringMatcher: add a method that returns a string view of the pattern
The existing pattern() method always returns a QString, which means that
if the matcher was constructed using a QStringView, pattern() would
uncoditionally convert it to a QString.

This is useful to check if a match is exact:
auto pattern = matcher.patternView();
if (pattern.size() == needle.size() && matcher.indexIn(needle) == 0)
    ....

This may be needed for a later change in QStringList::contains();
regardless of that, this change makes sense on its own.

Change-Id: I49018551dd22a8f88cf6b9f878a5166902a26f58
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-10-21 16:50:16 +03:00
..
.gitignore Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00
CMakeLists.txt CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
tst_qstringmatcher.cpp QStringMatcher: add a method that returns a string view of the pattern 2023-10-21 16:50:16 +03:00