qt5base-lts/tests/auto/corelib/text
Marc Mutz 6a3c6f939f Long live QStringTokenizer!
This class is designed as C++20-style generator / lazy sequence, and
the new return value of QString{,View}::tokenize().

It thus is more similar to a hand-coded loop around indexOf() than
QString::split(), which returns a container (the filling of which
allocates memory).

The template arguments of QStringTokenizer intricately depend on the
arguments with which it is constructed, so QStringTokenizer cannot be used
directly without C++17 CTAD. To work around this issue, add a factory
function, qTokenize().

LATER:
- ~Optimize QLatin1String needles (avoid repeated L1->UTF16 conversion)~
  (out of scope for QStringTokenizer, should be solved in the respective
  indexOf())
- Keep per-instantiation state:
  * Boyer-Moore table

[ChangeLog][QtCore][QStringTokenizer] New class.

[ChangeLog][QtCore][qTokenize] New function.

Change-Id: I7a7a02e9175cdd3887778f29f2f91933329be759
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-06-03 19:13:54 +02:00
..
qbytearray Adjust resize() behavior of QString and QByteArray to match Qt 5 2020-05-21 17:59:31 +02:00
qbytearraylist Regenerate tests/auto/corelib/text 2019-11-12 17:26:05 +00:00
qbytearraymatcher Port qtbase/tests/auto/corelib/text tests to CMake 2020-04-27 14:34:51 +02:00
qbytedatabuffer Regenerate projects one last time before merge 2020-02-12 17:30:49 +00:00
qchar QChar: add fromUcs{2,4}() 2020-05-09 06:26:08 +00:00
qcollator Port qtbase/tests/auto/corelib/text tests to CMake 2020-04-27 14:34:51 +02:00
qlatin1string Port qtbase/tests/auto/corelib/text tests to CMake 2020-04-27 14:34:51 +02:00
qlocale Rework QLocale and QDateTime tests that expect CET abbreviation 2020-05-28 15:15:17 +02:00
qregexp Remove QRegExp from QVariant 2020-05-14 12:19:47 +00:00
qregularexpression Port QRegularExpression to QStringView, drop QStringRef 2020-05-31 21:46:32 +02:00
qstring Add QStringView::split() methods 2020-06-01 20:43:21 +02:00
qstring_no_cast_from_bytearray Regenerate tests/auto/corelib/text 2019-11-12 17:26:05 +00:00
qstringapisymmetry Long live QStringTokenizer! 2020-06-03 19:13:54 +02:00
qstringbuilder Port qtbase/tests/auto/corelib/text tests to CMake 2020-04-27 14:34:51 +02:00
qstringconverter Streamline the code in the conversion to and from utf8 2020-05-14 07:51:45 +02:00
qstringiterator Sweep of int-ish → char-ish types near calls to QString::fromU*() 2020-05-12 05:43:37 +00:00
qstringlist Remove QRegExp support from QString and StringList 2020-05-14 14:19:47 +02:00
qstringmatcher Regenerate tests/auto/corelib/text 2019-11-12 17:26:05 +00:00
qstringref tst_qstringref: remove some wtf? 2020-05-14 20:30:35 +00:00
qstringtokenizer Long live QStringTokenizer! 2020-06-03 19:13:54 +02:00
qstringview QStringView: add converting constructor from array-like containers 2020-05-14 12:19:47 +00:00
qtextboundaryfinder Remove QTextCodec dependency from test 2020-05-14 07:50:49 +02:00
.prev_CMakeLists.txt Port qtbase/tests/auto/corelib/text tests to CMake 2020-04-27 14:34:51 +02:00
CMakeLists.txt Long live QStringTokenizer! 2020-06-03 19:13:54 +02:00
text.pro Long live QStringTokenizer! 2020-06-03 19:13:54 +02:00