GG: GG::Font::Substring Class Reference

GG

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

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

Public Member Functions | List of all members
GG::Font::Substring Class Reference

`#include <Font.h>`

## Public Member Functions
| Substring ()
| Substring (const std::string &str_, std::string::const_iterator first_, std::string::const_iterator second_)
| Substring (const std::string &str_, const IterPair &pair)
std::string::const_iterator | begin () const
std::string::const_iterator | end () const
bool | empty () const
std::size_t | size () const
| operator std::string () const
bool | operator== (const std::string &rhs) const
bool | operator!= (const std::string &rhs) const
Substring & | operator+= (const IterPair &rhs)

## Detailed Description

A range of iterators into a std::string that defines a substring found in a string being rendered by Font.

Definition at line 127 of file Font.h.

## Constructor & Destructor Documentation

GG::Font::Substring::Substring | ( |  | ) |

Default ctor.

GG::Font::Substring::Substring | ( | const std::string & | str_,
|  | std::string::const_iterator | first_,
|  | std::string::const_iterator | second_
| ) |  |

Ctor. first_ must be <= second_.

GG::Font::Substring::Substring | ( | const std::string & | str_,
|  | const IterPair & | pair
| ) |  |

Construction from base. pair.first must be <= pair.second.

## Member Function Documentation

std::string::const_iterator GG::Font::Substring::begin | ( |  | ) | const

Returns an iterator to the beginning of the substring.

std::string::const_iterator GG::Font::Substring::end | ( |  | ) | const

Returns an iterator to one-past-the-end of the substring.

bool GG::Font::Substring::empty | ( |  | ) | const

True iff .first == .second.

std::size_t GG::Font::Substring::size | ( |  | ) | const

Length, in original string chars, of the substring.

GG::Font::Substring::operator std::string | ( |  | ) | const

Implicit conversion to std::string.

bool GG::Font::Substring::operator== | ( | const std::string & | rhs | ) | const

Comparison with std::string.

bool GG::Font::Substring::operator!= | ( | const std::string & | rhs | ) | const

Comparison with std::string.

Substring& GG::Font::Substring::operator+= | ( | const IterPair & | rhs | ) |

Concatenation with base. rhs.first must be <= rhs.second. .second must be equal to rhs.first (*this and rhs must be contiguous).

The documentation for this class was generated from the following file:

- Font.h