formats a bool for use with OStream
More...
#include <OStream.hpp>
formats a bool for use with OStream
◆ FormatBool()
| fiber::FormatBool::FormatBool |
( |
bool | value | ) |
|
|
inlineconstexpr |
◆ center()
◆ fill()
Sets the fill character used for padding. Default is a space ' '.
◆ left()
Aligns the number to the left.
Example:
stream <<
"'" <<
FormatBool(
true).mwidth(6).left() <<
"', Expected: 'true '" <<
newl;
stream <<
"'" <<
FormatBool(
false).mwidth(6).left() <<
"', Expected: 'false '" <<
newl;
void newl(OStream &stream)
Writes a new line character to the stream.
Definition OStream.hpp:183
◆ like() [1/2]
◆ like() [2/2]
◆ mwidth()
Set a minimum width of characters that will be printed to the stream.
Example:
void endl(OStream &stream)
Writes a new line character to the stream followed by a call to OStream::flush()
Definition OStream.hpp:198
◆ num()
disables formating to a numer
prints the bool as numbers: '1', '0'
◆ right()
◆ text()
enables formating to text (default)
prints the bool as text: "true"/"false" (default if not calling the function)
◆ _value
| bool fiber::FormatBool::_value |
The documentation for this struct was generated from the following file: