libept
|
#include <string.h>
Public Member Functions | |
const_iterator (const Split &split) | |
Begin iterator. More... | |
const_iterator () | |
End iterator. More... | |
~const_iterator () | |
const_iterator & | operator++ () |
const std::string & | operator* () const |
const std::string * | operator-> () const |
std::string | remainder () const |
bool | operator== (const const_iterator &ti) const |
bool | operator!= (const const_iterator &ti) const |
Protected Member Functions | |
void | skip_separators () |
Move end past all the consecutive separators that start at its position. More... | |
Protected Attributes | |
const Split * | split = nullptr |
std::string | cur |
Current token. More... | |
size_t | end = 0 |
Position of the first character of the next token. More... | |
ept::str::Split::const_iterator::const_iterator | ( | const Split & | split | ) |
Begin iterator.
References ept::str::Split::skip_empty, and skip_separators().
|
inline |
End iterator.
References operator!=(), operator*(), operator++(), operator->(), operator==(), remainder(), and ~const_iterator().
Referenced by ept::str::Split::begin(), and ept::str::Split::end().
ept::str::Split::const_iterator::~const_iterator | ( | ) |
Referenced by const_iterator().
bool ept::str::Split::const_iterator::operator!= | ( | const const_iterator & | ti | ) | const |
Referenced by const_iterator().
const std::string & ept::str::Split::const_iterator::operator* | ( | ) | const |
References cur.
Referenced by const_iterator().
Split::const_iterator & ept::str::Split::const_iterator::operator++ | ( | ) |
Convert into an end iterator
The string ended with an iterator, and we do not skip empty tokens: return it
Position of the first character past the token that starts at 'end'
If separator is empty, advance one character at a time
The token ends at the next separator
No more separators found, return from end to the end of the string
We have the boundaries of the current token
Skip the separator
Skip all the following separators if skip_empty is true
References cur, end, ept::str::Split::sep, ept::str::Split::skip_empty, skip_separators(), split, and ept::str::Split::str.
Referenced by const_iterator().
const std::string * ept::str::Split::const_iterator::operator-> | ( | ) | const |
References cur.
Referenced by const_iterator().
bool ept::str::Split::const_iterator::operator== | ( | const const_iterator & | ti | ) | const |
Referenced by const_iterator().
std::string ept::str::Split::const_iterator::remainder | ( | ) | const |
References end, split, and ept::str::Split::str.
Referenced by const_iterator().
|
protected |
Move end past all the consecutive separators that start at its position.
References end, ept::str::Split::sep, split, and ept::str::Split::str.
Referenced by const_iterator(), and operator++().
|
protected |
Current token.
Referenced by operator*(), operator++(), and operator->().
|
protected |
Position of the first character of the next token.
Referenced by operator!=(), operator++(), operator==(), remainder(), and skip_separators().
|
protected |
Referenced by operator!=(), operator++(), operator==(), remainder(), and skip_separators().