Used to create temporary objects which are appended to AString instances.
Appends the given object to the AString using a defined 'field'-width. If the contents of the field is shorter than parameter width specifies, the field is filled with a corresponding amount of padChar characters.
Parameter alignment of type Alignment allows left-, right- or center-aligning. the contents of the field.
const String&
and this class is available after the inclusion of the header ALib.Strings.H.TChar | The character type of the AString that instances can be "applied" to. |
Definition at line 50 of file strings_tfield.inl.
Public Field Index: | |
lang::Alignment | alignment |
The alignment of the contents within the field. | |
integer | fieldWidth |
The width of the field. | |
TChar | padChar |
The characters used for padding the contents within the field. | |
Box | theContent |
Public Method Index: | |
TField (Box content, integer pWidth, lang::Alignment pAlignment=lang::Alignment::Right, TChar fillChar=' ') | |
lang::Alignment alib::strings::TField< TChar >::alignment |
The alignment of the contents within the field.
Definition at line 57 of file strings_tfield.inl.
integer alib::strings::TField< TChar >::fieldWidth |
The width of the field.
Definition at line 56 of file strings_tfield.inl.
TChar alib::strings::TField< TChar >::padChar |
The characters used for padding the contents within the field.
Definition at line 58 of file strings_tfield.inl.
Box alib::strings::TField< TChar >::theContent |
The content of the field. If module ALib Boxing is not available, this field is of type const TString<TChar>&
Definition at line 53 of file strings_tfield.inl.
|
inline |
Constructor. Copies the parameters.
content | The contents of the field. If the module ALib Boxing is not available, this field is of type const TString<TChar>& , otherwise of type Box. |
pWidth | The width of the field |
pAlignment | The alignment of the contents within the field. Defaults to Alignment::Right Other options are Alignment::Left and Alignment::Center. |
fillChar | The character used to fill the field up to its size. Defaults to ' ' (space). |
Definition at line 74 of file strings_tfield.inl.