diff options
author | Kai Koehne <kai.koehne@qt.io> | 2020-06-30 12:11:59 +0200 |
---|---|---|
committer | Kai Koehne <kai.koehne@qt.io> | 2020-07-01 15:10:54 +0200 |
commit | 63e2acec0018c9c51406301f5bac1005c4516165 (patch) | |
tree | b5f6265ddf39f5d0fa271633bde85e2d5ed7f677 /src/corelib/text/qstringtokenizer.cpp | |
parent | 9ca731ed48c8d67357b6684575f71b9dcbc37259 (diff) |
Documentation fixes for QStringTokenizer
Task-number: QTBUG-85343
Change-Id: Ib647d90ba3cfa1181690dc745249637031c7ad67
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src/corelib/text/qstringtokenizer.cpp')
-rw-r--r-- | src/corelib/text/qstringtokenizer.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/corelib/text/qstringtokenizer.cpp b/src/corelib/text/qstringtokenizer.cpp index a0316e568d..4e8ffc2c8e 100644 --- a/src/corelib/text/qstringtokenizer.cpp +++ b/src/corelib/text/qstringtokenizer.cpp @@ -46,14 +46,14 @@ QT_BEGIN_NAMESPACE \class QStringTokenizer \inmodule QtCore \since 6.0 - \brief The QStringTokenizer class splits strings into tokens along given separators + \brief The QStringTokenizer class splits strings into tokens along given separators. \reentrant \ingroup tools \ingroup string-processing Splits a string into substrings wherever a given separator occurs, - and returns a (lazy) list of those strings. If the separator does - not match anywhere in the string, produces a single-element + returning a (lazily constructed) list of those strings. If the separator does + not match anywhere in the string, produces a single-element list containing this string. If the separator is empty, QStringTokenizer produces an empty string, followed by each of the string's characters, followed by another empty string. The two @@ -85,7 +85,7 @@ QT_BEGIN_NAMESPACE from with which they are constructed, and they don't usually correspond to the actual types passed. - \section Lazy Sequences + \section1 Lazy Sequences QStringTokenizer acts as a so-called lazy sequence, that is, each next element is only computed once you ask for it. Lazy sequences @@ -107,17 +107,17 @@ QT_BEGIN_NAMESPACE [] (auto token) { use(token); }); \endcode - \section End Sentinel + \section1 End Sentinel The QStringTokenizer iterators cannot be used with classical STL algorithms, because those require iterator/iterator pairs, while - QStringTokenizer uses sentinels, that is, it uses a different + QStringTokenizer uses sentinels. That is, it uses a different type, QStringTokenizer::sentinel, to mark the end of the range. This improves performance, because the sentinel is an empty type. Sentinels are supported from C++17 (for ranged for) and C++20 (for algorithms using the new ranges library). - \section Temporaries + \section1 Temporaries QStringTokenizer is very carefully designed to avoid dangling references. If you construct a tokenizer from a temporary string @@ -132,7 +132,7 @@ QT_BEGIN_NAMESPACE \endcode If you pass named objects (lvalues), then QStringTokenizer does - not store a copy. You are reponsible to keep the named object's + not store a copy. You are responsible to keep the named object's data around for longer than the tokenizer operates on it: \code @@ -143,7 +143,7 @@ QT_BEGIN_NAMESPACE use(e); \endcode - \sa QStringView::split(), QLatin1Sting::split(), Qt::SplitBehavior, Qt::CaseSensitivity + \sa QStringView::split(), QLatin1String::split(), QRegularExpression */ /*! |