Equivalent to the std::back_insert_iterator in function, with some convenience helpers for string concatenation.
More...
#include <strings_internal.h>
Equivalent to the std::back_insert_iterator in function, with some convenience helpers for string concatenation.
Definition at line 248 of file strings_internal.h.
◆ difference_type
using StringBuilder::difference_type = void |
◆ iterator_category
using StringBuilder::iterator_category = std::output_iterator_tag |
◆ pointer
using StringBuilder::pointer = void |
◆ reference
using StringBuilder::reference = void |
◆ value_type
using StringBuilder::value_type = void |
◆ StringBuilder()
StringBuilder::StringBuilder |
( |
std::string & |
string | ) |
|
|
inline |
Create the builder of an external buffer.
- Parameters
-
string | The string to write to. |
Definition at line 263 of file strings_internal.h.
◆ CurrentIndex()
size_t StringBuilder::CurrentIndex |
( |
| ) |
|
|
inline |
◆ operator*()
◆ operator++() [1/2]
◆ operator++() [2/2]
◆ operator+=() [1/2]
Operator to add a character to the end of the buffer.
- Parameters
-
value | The character to add. |
- Returns
- Reference to this inserter.
Definition at line 287 of file strings_internal.h.
Referenced by operator=().
◆ operator+=() [2/2]
StringBuilder & StringBuilder::operator+= |
( |
std::string_view |
str | ) |
|
|
inline |
Operator to append the given string to the output buffer.
- Parameters
-
- Returns
- Reference to this inserter.
Definition at line 298 of file strings_internal.h.
◆ operator=()
Operator to add a character to the end of the buffer.
Like the back insert iterators this also increases the position of the end of the buffer.
- Parameters
-
value | The character to add. |
- Returns
- Reference to this inserter.
Definition at line 277 of file strings_internal.h.
References operator+=().
◆ operator[]()
char & StringBuilder::operator[] |
( |
size_t |
index | ) |
|
|
inline |
Get the reference to the character at the given index.
- Returns
- The reference to the character.
Definition at line 336 of file strings_internal.h.
◆ RemoveElementsFromBack()
void StringBuilder::RemoveElementsFromBack |
( |
size_t |
amount | ) |
|
|
inline |
Remove the given amount of characters from the back of the string.
- Parameters
-
amount | The amount of characters to remove. |
Definition at line 318 of file strings_internal.h.
Referenced by MakeCzechTownName().
◆ Utf8Encode()
void StringBuilder::Utf8Encode |
( |
char32_t |
c | ) |
|
|
inline |
◆ string
std::string* StringBuilder::string |
|
private |
The documentation for this class was generated from the following file: