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.AString objects already, all that is needed is to use macro ALIB_BOXING_BOOTSTRAP_REGISTER_FAPPEND_FOR_APPENDABLE_TYPE with the type in the bootstrap section of an application. | TChar | The character type of the AString that instances can be "applied" to. |
Definition at line 46 of file strings_tfield.hpp.
#include <strings_tfield.hpp>
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 52 of file strings_tfield.hpp.
| integer alib::strings::TField< TChar >::fieldWidth |
The width of the field.
Definition at line 51 of file strings_tfield.hpp.
| TChar alib::strings::TField< TChar >::padChar |
The characters used for padding the contents within the field.
Definition at line 53 of file strings_tfield.hpp.
| 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 48 of file strings_tfield.hpp.
|
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 Right Other options are Left and Center. |
| fillChar | The character used to fill the field up to its size. Defaults to ' ' (space). |
Definition at line 66 of file strings_tfield.hpp.