diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2017-11-22 15:48:02 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2020-06-03 19:13:54 +0200 |
commit | 6a3c6f939f29c83d53d2da0c3f53b814bdd02358 (patch) | |
tree | b0734ab85ce0839a80e440b42da4216ff7291378 /src/plugins/platforms/cocoa/qpaintengine_mac_p.h | |
parent | 1b33ee95e5c6e5e27f732fd273920861fdae486a (diff) |
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>
Diffstat (limited to 'src/plugins/platforms/cocoa/qpaintengine_mac_p.h')
0 files changed, 0 insertions, 0 deletions