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.
ept::str::Split::const_iterator::~const_iterator | ( | ) |
bool ept::str::Split::const_iterator::operator!= | ( | const const_iterator & | ti | ) | const |
References end, ept::str::Split::end(), and split.
const std::string & ept::str::Split::const_iterator::operator* | ( | ) | const |
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 ept::str::Split::end(), ept::str::Split::sep, ept::str::Split::skip_empty, and ept::str::Split::str.
const std::string * ept::str::Split::const_iterator::operator-> | ( | ) | const |
bool ept::str::Split::const_iterator::operator== | ( | const const_iterator & | ti | ) | const |
References end, ept::str::Split::end(), and split.
std::string ept::str::Split::const_iterator::remainder | ( | ) | const |
References ept::str::Split::end().
|
protected |
Move end past all the consecutive separators that start at its position.
References ept::str::Split::end(), ept::str::Split::sep, and ept::str::Split::str.
Referenced by const_iterator().
|
protected |
Current token.
|
protected |
Position of the first character of the next token.
Referenced by operator!=(), and operator==().
|
protected |
Referenced by operator!=(), and operator==().