Empirical
|
#include <DynamicString.h>
Public Types | |
using | value_t = std::function< std::string()> |
Public Member Functions | |
DynamicString () | |
DynamicString (const DynamicString &)=default | |
size_t | GetSize () const |
How many string components (funcations or continuous substrings) are in this DynamicString? More... | |
std::string | operator[] (size_t id) const |
const value_t & | GetFunction (size_t id) const |
DynamicString & | Clear () |
Remove all contents on this DynamicString. More... | |
std::string | str () |
Convert to an std::string. More... | |
DynamicString & | Set (size_t id, const value_t &in_fun) |
Set the value of a specified component to the provided function. More... | |
DynamicString & | Set (size_t id, const std::string &in_text) |
Set the value of a specified component to the provided std::string text. More... | |
DynamicString & | Append (const value_t &in_fun) |
Add a new function to the end of the DynamicString. More... | |
DynamicString & | Append (const std::string &in_text) |
Add new std::string text to the end of the DynamicString. More... | |
template<typename IN_TYPE > | |
DynamicString & | operator<< (IN_TYPE &&_in) |
Allow operator<< to append to the back of a DynamicString. More... | |
A string handler where some sections can be fixed strings, while others update dynamically based on functions.
using emp::DynamicString::value_t = std::function<std::string()> |
|
inline |
|
default |
|
inline |
Add a new function to the end of the DynamicString.
|
inline |
Add new std::string text to the end of the DynamicString.
|
inline |
Remove all contents on this DynamicString.
|
inline |
Index in to a specific component (not a specific character, since size is variable) and return it's associated function.
|
inline |
How many string components (funcations or continuous substrings) are in this DynamicString?
|
inline |
Allow operator<< to append to the back of a DynamicString.
|
inline |
Index in to a specific component (not a specific character, since size is variable) and return it's associated string.
|
inline |
Set the value of a specified component to the provided function.
|
inline |
Set the value of a specified component to the provided std::string text.
|
inline |
Convert to an std::string.