|
GlitchyByte Lib
0.3.1
GlitchyByte general library to bootstrap development.
|
Public Member Functions | |
| StringInterpolationVars () noexcept=default | |
| StringInterpolationVars (StringInterpolationVars const &other) noexcept | |
| StringInterpolationVars (StringInterpolationVars &&other) noexcept | |
| StringInterpolationVars & | operator= (StringInterpolationVars const &other) noexcept |
| StringInterpolationVars & | operator= (StringInterpolationVars &&other) noexcept |
| StringInterpolationVars & | set (std::string_view const name, std::string_view const value) noexcept |
| std::string | interpolate (std::string_view const str) const noexcept |
| std::string | string () const noexcept |
Class to hold variable names and their values for string interpolation.
Variables in strings are of the form "${myVar}".
Set that variable on this object by calling set("myVar", "5").
|
defaultnoexcept |
Creates a template string var container.
|
inlinenoexcept |
Copy constructor.
| other | Other object to copy from. |
|
inlinenoexcept |
Move constructor.
| other | Other object to move the contents from. |
|
inlinenoexcept |
Copy assignment.
| other | Other object to copy from. |
|
inlinenoexcept |
Move assignment.
| other | Other object to move the contents from. |
|
inlinenoexcept |
Sets a template variable and its value.
| name | Variable name. |
| value | Value. |
|
inlinenoexcept |
Substitutes variables in a string template.
| str | String template. |
|
inlinenoexcept |
String representation.