Allows pushing results of StringFormat to a buffer or to the console.
More...
#include <StringFormat.h>
Allows pushing results of StringFormat to a buffer or to the console.
◆ StringFormatOutput() [1/2]
SC::StringFormatOutput::StringFormatOutput |
( |
StringEncoding |
encoding, |
|
|
Vector< char > & |
destination |
|
) |
| |
Constructs a StringFormatOutput object pushing to a destination buffer.
- Parameters
-
encoding | The given encoding |
destination | The destination buffer |
◆ StringFormatOutput() [2/2]
Constructs a StringFormatOutput object pushing to a console.
- Parameters
-
encoding | The given encoding |
destination | The destination console |
◆ append()
bool SC::StringFormatOutput::append |
( |
StringView |
text | ) |
|
Appends the StringView (eventually converting it) to destination buffer.
- Parameters
-
text | The StringView to be appended to buffer or console |
- Returns
true
if conversion succeeded
◆ onFormatBegin()
void SC::StringFormatOutput::onFormatBegin |
( |
| ) |
|
Method to be called when format begins, so that it can be rolled back on failure.
◆ onFormatFailed()
void SC::StringFormatOutput::onFormatFailed |
( |
| ) |
|
Method to be called when format fails (will rollback buffer to length before onFormatBegin
)
◆ onFormatSucceeded()
bool SC::StringFormatOutput::onFormatSucceeded |
( |
| ) |
|
Method to be called when format succeeds.
- Returns
true
if null terminator has been successfully added
The documentation for this struct was generated from the following file: