Toolset to build a string content.
More...
#include <string_builder.h>
Toolset to build a string content.
Definition at line 27 of file string_builder.h.
◆ StringBuilder()
Beatmup::StringBuilder::StringBuilder |
( |
std::string & |
workspace | ) |
|
|
inline |
◆ replace()
StringBuilder& Beatmup::StringBuilder::replace |
( |
const std::string & |
search, |
|
|
const std::string & |
replacement |
|
) |
| |
|
inline |
Definition at line 34 of file string_builder.h.
36 while ((pos =
str.find(search, pos)) != std::string::npos) {
37 str.replace(pos, search.length(), replacement);
38 pos += replacement.length();
◆ operator()()
StringBuilder& Beatmup::StringBuilder::operator() |
( |
const std::string & |
append | ) |
|
|
inline |
◆ line()
StringBuilder& Beatmup::StringBuilder::line |
( |
const std::string & |
append | ) |
|
|
inline |
◆ printf()
template<const int BUF_SIZE = 256>
StringBuilder& Beatmup::StringBuilder::printf |
( |
const char * |
format, |
|
|
|
... |
|
) |
| |
|
inline |
Definition at line 53 of file string_builder.h.
56 char buffer[BUF_SIZE];
62 (buffer, BUF_SIZE,
format, args);
JNIEnv jobject jint format
◆ nl()
◆ operator std::string &()
Beatmup::StringBuilder::operator std::string & |
( |
| ) |
|
|
inline |
◆ dump()
void StringBuilder::dump |
( |
std::string |
filename | ) |
|
◆ str
std::string& Beatmup::StringBuilder::str |
|
private |
The documentation for this class was generated from the following files: