Implements a temporary object which is appended to instances of type AString .
Appends tab characters (as provided) to reach a certain length (aka tabulator position) of the target . The tab position is referenced to an optionally given reference value which might be the start of the string or the position of the last newline. If this parameter is negative, the last newline characters are searched from the end of the string backwards.
Referring to that as position 0, the tab position is then located at the next multiple of parameter tabSize , after having added minPad tab characters.
Definition at line 104 of file format.hpp.
#include <format.hpp>
Public Field Index: | |
integer | minPad |
integer | reference |
TChar | tabChar |
integer | tabSize |
Public Method Index: | |
Tab (integer size, integer referenceIdx=0, integer minPadChars=1, TChar fillChar=' ') | |
integer minPad |
The minimum pad characters to add. Defaults to 1.
Definition at line 118 of file format.hpp.
integer reference |
The reference length of the AString which is taken as relative tab position (instead of the beginning of the string). If -1, the target AString is searched backwards for the last newline and this position is used as the reference.
Definition at line 115 of file format.hpp.
TChar tabChar |
The character to insert to reach the tab position. Normally this is the space character ' '.
Definition at line 122 of file format.hpp.
integer tabSize |
The tab positions are multiples of this value.
Definition at line 108 of file format.hpp.
|
inline |
Constructor. Copies the parameters.
size | The tab positions are multiples of this parameter. |
referenceIdx | The reference index marking the start of the actual line. If -1, the last new-line character is searched from the end of the string backwards, and used. Defaults to 0. |
minPadChars | The minimum pad characters to add. Defaults to 1. |
fillChar | The character to insert to reach the tab position. Defaults to ' ' (space). |
Definition at line 135 of file format.hpp.