diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2020-04-21 16:30:32 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2020-04-26 13:46:18 +0200 |
commit | 4ba25a092065a6422510a9f4afa4fbbabeda686c (patch) | |
tree | b89e0109e4bddc22f70a872f72cb462305989f50 /src/corelib/doc/snippets | |
parent | 19bfcdaa43f6ac8841942cb545811eab409f1713 (diff) |
QStringIterator: port from uint to char32_t
Change-Id: I0ca47b87216478b28e29b0fa1a118ef13b6d7c84
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Diffstat (limited to 'src/corelib/doc/snippets')
-rw-r--r-- | src/corelib/doc/snippets/code/src_corelib_tools_qstringiterator.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/corelib/doc/snippets/code/src_corelib_tools_qstringiterator.cpp b/src/corelib/doc/snippets/code/src_corelib_tools_qstringiterator.cpp index eb09fb99e2..8085e32787 100644 --- a/src/corelib/doc/snippets/code/src_corelib_tools_qstringiterator.cpp +++ b/src/corelib/doc/snippets/code/src_corelib_tools_qstringiterator.cpp @@ -62,8 +62,6 @@ QStringIterator i(string); // implicitly converted to QStringView //! [0] //! [1] -// will print 97, 32, 115, 116, etc.; -// that is, the decimal value of the code points in the Unicode string "a string" while (i.hasNext()) qDebug() << i.next(); //! [1] @@ -72,9 +70,9 @@ while (i.hasNext()) { //! [2] QStringIterator i(u"𝄞 is the G clef"); -qDebug() << Qt::hex << i.next(); // will print 1d11e (U+1D11E, MUSICAL SYMBOL G CLEF) -qDebug() << Qt::hex << i.next(); // will print 20 (U+0020, SPACE) -qDebug() << Qt::hex << i.next(); // will print 69 (U+0069, LATIN SMALL LETTER I) +qDebug() << Qt::hex << i.next(); // will print '𝄞' (U+1D11E, MUSICAL SYMBOL G CLEF) +qDebug() << Qt::hex << i.next(); // will print ' ' (U+0020, SPACE) +qDebug() << Qt::hex << i.next(); // will print 'i' (U+0069, LATIN SMALL LETTER I) //! [2] } |