Elm
2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
#include <elm/io/Output.h>
Public Member Functions | |
StringFormat (void) | |
StringFormat (string str) | |
StringFormat & | operator() (string str) |
StringFormat & | width (int w) |
StringFormat & | align (alignment_t a) |
StringFormat & | left (void) |
StringFormat & | center (void) |
StringFormat & | right (void) |
StringFormat & | pad (char p) |
Public Attributes | |
string | s |
unsigned char | _width |
unsigned char | _align: 2 |
unsigned char | _pad |
Store formatting information for character string. To automatically build a string format, uses the fmt() function.
|
inline |
|
inline |
|
inline |
Select alignment position when string is bigger than the selected width. Default alignment value is left.
a | One of LEFT, CENTER or RIGHT. |
References StringFormat::_align.
|
inline |
center string display.
References StringFormat::_align, and elm::io::CENTER.
|
inline |
Align string display to left.
References StringFormat::_align, and elm::io::LEFT.
|
inline |
References StringFormat::s, and elm::str().
|
inline |
Select the padding character when a width is selected. As a default, it is a space.
p | Padding character. |
References StringFormat::_pad, and elm::io::p().
|
inline |
Align string display to right.
References StringFormat::_align, and elm::io::RIGHT.
|
inline |
Select width of the display. As a default, there is o width and the full string is displayed.
w | Width in character. |
References StringFormat::_width.
unsigned char _align |
Referenced by StringFormat::align(), StringFormat::center(), StringFormat::left(), and StringFormat::right().
unsigned char _pad |
Referenced by StringFormat::pad().
unsigned char _width |
Referenced by StringFormat::width().
string s |
Referenced by StringFormat::operator()().