A bi-directional Iterator type that allow iteration over Unicode characters (rather than bytes). STL-compatible.
#include <utility/YiStringView.h>
Public Types | |
typedef std::bidirectional_iterator_tag | iterator_category |
typedef char32_t | value_type |
typedef ptrdiff_t | difference_type |
typedef const char32_t * | pointer |
typedef char32_t | reference |
Public Member Functions | |
ConstIterator () | |
ConstIterator (CYIStringView string, size_t charactersOffset) | |
ConstIterator (const ConstIterator &other) | |
~ConstIterator () | |
ConstIterator & | operator= (const ConstIterator &other) |
value_type | operator* () const |
bool | operator== (const ConstIterator &other) const |
bool | operator!= (const ConstIterator &other) const |
ConstIterator & | operator++ () |
ConstIterator | operator++ (int) |
ConstIterator & | operator-- () |
ConstIterator | operator-- (int) |
const char * | GetRawData () const |
ConstReverseIterator | Reverse () const |
Friends | |
class | CYIStringView |
class | CYIString |
typedef ptrdiff_t CYIStringView::ConstIterator::difference_type |
typedef std::bidirectional_iterator_tag CYIStringView::ConstIterator::iterator_category |
typedef const char32_t* CYIStringView::ConstIterator::pointer |
typedef char32_t CYIStringView::ConstIterator::reference |
typedef char32_t CYIStringView::ConstIterator::value_type |
CYIStringView::ConstIterator::ConstIterator | ( | ) |
CYIStringView::ConstIterator::ConstIterator | ( | CYIStringView | string, |
size_t | charactersOffset | ||
) |
CYIStringView::ConstIterator::ConstIterator | ( | const ConstIterator & | other | ) |
CYIStringView::ConstIterator::~ConstIterator | ( | ) |
const char* CYIStringView::ConstIterator::GetRawData | ( | ) | const |
Returns the address to the raw UTF-8 data pointed to by this iterator.
bool CYIStringView::ConstIterator::operator!= | ( | const ConstIterator & | other | ) | const |
value_type CYIStringView::ConstIterator::operator* | ( | ) | const |
Returns the 32-bit Unicode value pointed to by this iterator. Returns 0 when the 'end' iterator is dereferenced.
ConstIterator& CYIStringView::ConstIterator::operator++ | ( | ) |
ConstIterator CYIStringView::ConstIterator::operator++ | ( | int | ) |
ConstIterator& CYIStringView::ConstIterator::operator-- | ( | ) |
ConstIterator CYIStringView::ConstIterator::operator-- | ( | int | ) |
ConstIterator& CYIStringView::ConstIterator::operator= | ( | const ConstIterator & | other | ) |
bool CYIStringView::ConstIterator::operator== | ( | const ConstIterator & | other | ) | const |
ConstReverseIterator CYIStringView::ConstIterator::Reverse | ( | ) | const |
|
friend |
|
friend |