CsString  1.3.2
CsString::CsStringReverseIterator< T > Class Template Reference

Reverse iterator class for CsBasicString. More...

Inherits reverse_iterator< T >.

Public Typedefs

using size_type = std::ptrdiff_t
 

Public Member Functions

 CsStringReverseIterator () = default
 
template<typename U>
 CsStringReverseIterator (CsStringReverseIterator< U > iter)
 
 CsStringReverseIterator (T iter)
 
bool operator!= (const CsStringReverseIterator< T > &other) const
 
decltype (std::declval< T >().operator*()) operator* () const
 
CsStringReverseIterator< T > operator+ (size_type n) const
 
CsStringReverseIterator< T > & operator++ ()
 
CsStringReverseIterator< T > operator++ (int)
 
CsStringReverseIterator< T > & operator+= (size_type n)
 
size_type operator- (CsStringReverseIterator< T > other) const
 
CsStringReverseIterator< T > operator- (size_type n) const
 
CsStringReverseIterator< T > & operator-- ()
 
CsStringReverseIterator< T > operator-- (int)
 
CsStringReverseIterator< T > & operator-= (size_type n)
 
decltype (std::declval< T >().operator->()) operator-> () const
 
bool operator< (const CsStringReverseIterator< T > &other) const
 
bool operator<= (const CsStringReverseIterator< T > &other) const
 
bool operator== (const CsStringReverseIterator< T > &other) const
 
bool operator> (const CsStringReverseIterator< T > &other) const
 
bool operator>= (const CsStringReverseIterator< T > &other) const
 
CsString::CsChar operator[] (size_type n) const
 

Detailed Description

template<typename T>
class CsString::CsStringReverseIterator< T >

This class implements a random access iterator reverse for CsBasicString. All CsStringReverseIterators are const.

Member Typedef Documentation

template<typename T>
CsStringReverseIterator::size_type

Typedef for an integer type representing sizes in a reverse iterator.

Constructor & Destructor Documentation

template<typename T>
CsString::CsStringReverseIterator< T >::CsStringReverseIterator ( )
inlinedefault

Constructs an uninitialized CsStringReverseIterator.

template<typename T>
CsStringReverseIterator::CsStringReverseIterator ( iter)
inline

Constructs a CsStringReverseIterator which points to the same code point as iter.

template<typename T>
template<typename U>
CsStringReverseIterator::CsStringReverseIterator ( CsStringReverseIterator<U>  iter)
inline

Constructs a CsStringReverseIterator which points to the same code point as iter.

Member Function Documentation

template<typename T>
bool CsStringReverseIterator::operator!= ( const CsStringReverseIterator<T> &  other) const

Returns true if other points to a different code point than this iterator, otherwise returns false.

See also
operator==().
template<typename T>
CsChar CsStringReverseIterator::operator* ( ) const

Returns the current code point.

template<typename T>
CsStringReverseIterator< T > CsStringReverseIterator::operator+ ( size_type  n) const

Returns an iterator to the code point j positions after this iterator. If j is negative, the iterator goes backward.

See also
operator-() and operator+=().
template<typename T>
CsStringReverseIterator< T > & CsStringReverseIterator::operator++ ( )

The prefix ++ operator advances the iterator to the next code point in the string and returns the new iterator.

Calling this methods on the end() iterator leads to undefined results.

See also
operator--().
template<typename T>
CsStringReverseIterator< T > CsStringReverseIterator::operator++ ( int  )

The postfix ++ operator advances the iterator to the next code point in the string and returns the old iterator.

template<typename T>
CsStringReverseIterator< T > & CsStringReverseIterator::operator+= ( size_type  n)

Advances the iterator by j code points. If j is negative, the iterator goes backward.

See also
operator-=() and operator+().
template<typename T>
size_type CsString::CsStringReverseIterator< T >::operator- ( CsStringReverseIterator<T>  other) const

Returns the number of code points between the code point pointed to by other and the code point pointed to by this iterator.

template<typename T>
CsStringReverseIterator< T > CsString::CsStringReverseIterator< T >::operator- ( size_type  n) const

Returns an iterator to the code point at n positions backward from this iterator. If n is negative, the iterator goes forward.

See also
operator+() and operator-=().
template<typename T>
CsStringReverseIterator< T > & CsStringReverseIterator::operator-- ( )

The prefix – operator decrements the iterator to the previous code point in the string and returns the new iterator.

Calling this method on begin() leads to undefined results.

See also
operator++().
template<typename T>
CsStringReverseIterator< T > CsStringReverseIterator::operator-- ( int  )

The postfix – operator decrements the iterator to the previous code point in the string and returns the old iterator.

template<typename T>
CsStringReverseIterator< T > & CsStringReverseIterator::operator-= ( size_type  n)

Returns an iterator to the code point at j positions backward from this iterator. If j is negative the iterator goes forward.

See also
operator+() and operator-=().
template<typename T>
CsChar CsStringReverseIterator::operator-> ( ) const

Returns the current code point.

template<typename T>
bool CsStringReverseIterator::operator< ( const CsStringReverseIterator<T> &  other) const

Returns true if this iterator is closer to the beginning of the string than the other iterator.

template<typename T>
bool CsStringReverseIterator::operator<= ( const CsStringReverseIterator<T> &  other) const

Returns true if this iterator is equal to or closer to the beginning of the string than the other iterator.

template<typename T>
bool CsStringReverseIterator::operator== ( const CsStringReverseIterator<T> &  other) const

Returns true if other points to the same code point as this iterator, otherwise returns false.

See also
operator!=().
template<typename T>
bool CsStringReverseIterator::operator> ( const CsStringReverseIterator<T> &  other) const

Returns true if this iterator is further from the beginning of the string than the other iterator.

template<typename T>
bool CsStringReverseIterator::operator>= ( const CsStringReverseIterator<T> &  other) const

Returns true if this iterator is equal to or further from the beginning of the string than the other iterator.

template<typename T>
CsChar CsStringReverseIterator::operator[] ( size_type  n) const

Returns the code point at position this + n.

See also
operator+().