STL style const iterator for QString8.
More...
Inherits const_iterator
The QString8::iterator class provides an STL style iterator which allows you to iterate over a QString8. If you want to modify the QString8 as you iterate over it use QString8::iterator. If you do not need to alter the string use QString8::const_iterator instead.
- See also
- QString8::iterator
QString8::const_iterator::const_iterator |
( |
| ) |
|
|
default |
QString8::const_iterator::const_iterator |
( |
iterator |
iter | ) |
|
|
inline |
Constructs a copy of iter.
bool QString8::const_iterator::operator!= |
( |
const const_iterator & |
other | ) |
const |
|
inline |
Returns true if other points to a different item than this iterator, otherwise it returns false.
- See also
- operator==()
const QChar32 QString8::const_iterator::operator* |
( |
| ) |
const |
|
inline |
Returns the value this iterator currently points to.
const_iterator QString8::const_iterator::operator+ |
( |
size_type |
n | ) |
const |
|
inline |
Returns an iterator to the item at n positions forward from this iterator. If n is negative the iterator goes backward.
This operation can be slow for large values of n.
- See also
- operator-()
const_iterator & QString8::const_iterator::operator++ |
( |
| ) |
|
|
inline |
The prefix ++ operator (++i
) advances the iterator to the next item in the string and returns an iterator to the new current item.
Calling this method on QString8::end() leads to undefined behavior.
const_iterator QString8::const_iterator::operator++ |
( |
int |
n | ) |
|
|
inline |
The postfix ++ operator (i++
) advances the iterator to the next item in the string and returns an iterator to the previously current item.
const_iterator & QString8::const_iterator::operator+= |
( |
size_type |
n | ) |
|
|
inline |
Advances the iterator by n items. If n is negative the iterator goes backward.
This operation can be slow for large values of n.
- See also
- operator-=(), operator+()
size_type QString8::const_iterator::operator- |
( |
const_iterator |
other | ) |
const |
|
inline |
Returns the number of code points between the code point pointed to by other and the code point pointed to by this iterator.
const_iterator QString8::const_iterator::operator- |
( |
size_type |
n | ) |
const |
|
inline |
Returns an iterator to the item at n positions backward from this iterator. If n is negative the iterator goes forward.
This operation can be slow for large values of n.
- See also
- operator+()
const_iterator & QString8::const_iterator::operator-- |
( |
| ) |
|
|
inline |
The prefix – operator decrements the iterator to the previous item in the string and returns an iterator to the new current item.
Calling this method on QString8::begin() leads to undefined behavior.
const_iterator QString8::const_iterator::operator-- |
( |
int |
n | ) |
|
|
inline |
The postfix – operator decrements the iterator to the previous item in the string and returns an iterator to the previously current item.
Calling this method on QString8::begin() leads to undefined behavior.
const_iterator & QString8::const_iterator::operator-= |
( |
size_type |
n | ) |
|
|
inline |
Move the iterator back by n items. If n is negative the iterator goes forward.
This operation can be slow for large values of n.
- See also
- operator+=(), operator-()
QChar32Arrow QString8::const_iterator::operator-> |
( |
| ) |
const |
|
inline |
This operator is a simplified way to dereference an iterator and access the value in one step.
The expression iter->isSpace()
is equivalent to (*iter).isSpace()
.
auto iter = str.begin();
if (iter->isSpace() ) {
}
bool QString8::const_iterator::operator== |
( |
const const_iterator & |
other | ) |
const |
|
inline |
Returns true if other points to the same item as this iterator, otherwise it returns false.
- See also
- operator!=()
Returns the item at n positions forward from this iterator. If n is negative the iterator goes backward.
This operation can be slow for large values of n.
- See also
- operator-()
Returns an iterator to the item at n positions forward from iter. If n is negative the iterator goes backward.
This operation can be slow for large values of n.