glibmm: Glib::ustring_Iterator< T > Class Template Reference

glibmm 2.38.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Related Functions | List of all members
Glib::ustring_Iterator< T > Class Template Reference

The iterator type of Glib::ustring. More...

`#include <glibmm/ustring.h>`

## Public Types
typedef std::bidirectional_iterator_tag | iterator_category
typedef gunichar | value_type
typedef std::string::difference_type | difference_type
typedef value_type | reference
typedef void | pointer

## Public Member Functions
| ustring_Iterator ()
| ustring_Iterator (const ustring_Iterator< std::string::iterator >& other)
value_type | operator* () const
ustring_Iterator< T >& | operator++ ()
const ustring_Iterator< T > | operator++ (int)
ustring_Iterator< T >& | operator-- ()
const ustring_Iterator< T > | operator-- (int)
| ustring_Iterator (T pos)
T | base () const

## Related Functions
(Note that these are not member functions.)
bool | operator== (const Glib::ustring::const_iterator& lhs, const Glib::ustring::const_iterator& rhs)
bool | operator!= (const Glib::ustring::const_iterator& lhs, const Glib::ustring::const_iterator& rhs)
bool | operator< (const Glib::ustring::const_iterator& lhs, const Glib::ustring::const_iterator& rhs)
bool | operator> (const Glib::ustring::const_iterator& lhs, const Glib::ustring::const_iterator& rhs)
bool | operator<= (const Glib::ustring::const_iterator& lhs, const Glib::ustring::const_iterator& rhs)
bool | operator>= (const Glib::ustring::const_iterator& lhs, const Glib::ustring::const_iterator& rhs)

## Detailed Description

### template<class T>
class Glib::ustring_Iterator< T >

The iterator type of Glib::ustring.

Note this is not a random access iterator but a bidirectional one, since all index operations need to iterate over the UTF-8 data. Use std::advance() to move to a certain position. However, all of the relational operators are available: `== != < > <= >=`

A writeable iterator isn't provided because: The number of bytes of the old UTF-8 character and the new one to write could be different. Therefore, any write operation would invalidate all other iterators pointing into the same string.

## Member Typedef Documentation

template <class T >

typedef std::string::difference_type Glib::ustring_Iterator< T >::difference_type

template <class T >

typedef std::bidirectional_iterator_tag Glib::ustring_Iterator< T >::iterator_category

template <class T >

typedef void Glib::ustring_Iterator< T >::pointer

template <class T >

typedef value_type Glib::ustring_Iterator< T >::reference

template <class T >

typedef gunichar Glib::ustring_Iterator< T >::value_type

## Constructor & Destructor Documentation

template <class T >

Glib::ustring_Iterator< T >::ustring_Iterator | ( |  | ) |
| inline

template <class T >

Glib::ustring_Iterator< T >::ustring_Iterator | ( | const ustring_Iterator< std::string::iterator >& | other | ) |
| inline

template <class T >

Glib::ustring_Iterator< T >::ustring_Iterator | ( | T | pos | ) |
| inlineexplicit

## Member Function Documentation

template <class T >

T Glib::ustring_Iterator< T >::base | ( |  | ) | const
| inline

template <class T >

value_type Glib::ustring_Iterator< T >::operator* | ( |  | ) | const
| inline

template <class T >

ustring_Iterator<T>& Glib::ustring_Iterator< T >::operator++ | ( |  | ) |
| inline

template <class T >

const ustring_Iterator<T> Glib::ustring_Iterator< T >::operator++ | ( | int |  | ) |
| inline

template <class T >

ustring_Iterator<T>& Glib::ustring_Iterator< T >::operator-- | ( |  | ) |
| inline

template <class T >

const ustring_Iterator<T> Glib::ustring_Iterator< T >::operator-- | ( | int |  | ) |
| inline

## Friends And Related Function Documentation

template <class T >

bool operator!= | ( | const Glib::ustring::const_iterator& | lhs,
|  | const Glib::ustring::const_iterator& | rhs
| ) |  |
| related

template <class T >

bool operator< | ( | const Glib::ustring::const_iterator& | lhs,
|  | const Glib::ustring::const_iterator& | rhs
| ) |  |
| related

template <class T >

bool operator<= | ( | const Glib::ustring::const_iterator& | lhs,
|  | const Glib::ustring::const_iterator& | rhs
| ) |  |
| related

template <class T >

bool operator== | ( | const Glib::ustring::const_iterator& | lhs,
|  | const Glib::ustring::const_iterator& | rhs
| ) |  |
| related

template <class T >

bool operator> | ( | const Glib::ustring::const_iterator& | lhs,
|  | const Glib::ustring::const_iterator& | rhs
| ) |  |
| related

template <class T >

bool operator>= | ( | const Glib::ustring::const_iterator& | lhs,
|  | const Glib::ustring::const_iterator& | rhs
| ) |  |
| related