5#ifndef QSTRINGITERATOR_H
6#define QSTRINGITERATOR_H
19#include <QtCore/private/qglobal_p.h>
20#include <QtCore/qstring.h>
27 static_assert((std::is_same<QString::const_iterator, const QChar *>::value));
28 static bool less(
const QChar *lhs,
const QChar *rhs)
noexcept
29 {
return std::less{}(lhs, rhs); }
102 return QChar::surrogateToUcs4(
pos[0],
pos[1]);
105 return pos->unicode();
108 inline char32_t peekNext(
char32_t invalidAs = QChar::ReplacementCharacter)
const
115 if (
Q_LIKELY(low != e && low->isLowSurrogate()))
116 return QChar::surrogateToUcs4(*
pos, *low);
121 return pos->unicode();
131 return QChar::surrogateToUcs4(cur, *
pos++);
133 return cur.unicode();
136 inline char32_t next(
char32_t invalidAs = QChar::ReplacementCharacter)
143 return QChar::surrogateToUcs4(uc, *
pos++);
163 if (
Q_LIKELY(high !=
i - 1 && high->isHighSurrogate()))
184 return QChar::surrogateToUcs4(
pos[-2],
pos[-1]);
186 return pos[-1].unicode();
189 inline char32_t peekPrevious(
char32_t invalidAs = QChar::ReplacementCharacter)
const
196 if (
Q_LIKELY(high !=
i - 1 && high->isHighSurrogate()))
197 return QChar::surrogateToUcs4(*high,
pos[-1]);
202 return pos[-1].unicode();
212 return QChar::surrogateToUcs4(*--
pos, cur);
214 return cur.unicode();
217 inline char32_t previous(
char32_t invalidAs = QChar::ReplacementCharacter)
224 return QChar::surrogateToUcs4(*--
pos, uc);
char32_t peekNext(char32_t invalidAs=QChar::ReplacementCharacter) const
char32_t next(char32_t invalidAs=QChar::ReplacementCharacter)
QStringIterator(const QChar *begin, qsizetype idx, const QChar *end)
QString::const_iterator position() const
char32_t previous(char32_t invalidAs=QChar::ReplacementCharacter)
QStringIterator(QStringView string, qsizetype idx=0)
char32_t peekPreviousUnchecked() const
QStringIterator(const QChar *begin, const QChar *end)
char32_t peekNextUnchecked() const
void setPosition(QString::const_iterator position)
char32_t peekPrevious(char32_t invalidAs=QChar::ReplacementCharacter) const
char32_t previousUnchecked()
Combined button and popup list for selecting options.
GLsizei const GLchar *const * string
[0]
#define Q_ASSERT_X(cond, x, msg)
QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIterator begin(const QRegularExpressionMatchIterator &iterator)