Minimal tool for formatting console stuff with fixed line width.
More...
#include <tomographer/tools/fmt.h>
Minimal tool for formatting console stuff with fixed line width.
Definition at line 407 of file fmt.h.
§ ConsoleFormatterHelper()
Tomographer::Tools::ConsoleFormatterHelper::ConsoleFormatterHelper |
( |
int |
width = 0 | ) |
|
|
inline |
Constructor.
- Parameters
-
width | is the target with of the stuff you want to output. If width is zero, then an appropriate default is chosen including an attempt to detect the current console width. |
Definition at line 417 of file fmt.h.
§ centerLine()
Produce a centered string.
- Returns
- a string of columns() characters, with x displayed in the middle of the line. A newline is added. If x is wider than the line length, it is returned in full with a newline appended.
Definition at line 431 of file fmt.h.
§ leftLine()
Produce a left-aligned string.
- Returns
- a string of columns() characters, with x displayed at the left of the line. The string is padded with spaces and a final newline. If x is wider than the line length, it is returned in full with a newline appended.
Definition at line 463 of file fmt.h.
§ rightLine()
Produce a right-aligned string.
- Returns
- a string of columns() characters, with x displayed at the right of the line. A newline is added. If x is wider than the line length, it is returned in full with a newline appended.
Definition at line 448 of file fmt.h.
The documentation for this class was generated from the following file: