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 103 of file format.inl.
Public Field Index: | |
integer | minPad |
The minimum pad characters to add. Defaults to 1. | |
integer | reference |
TChar | tabChar |
integer | tabSize |
The tab positions are multiples of this value. | |
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 116 of file format.inl.
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 113 of file format.inl.
TChar tabChar |
The character to insert to reach the tab position. Normally this is the space character ' '.
Definition at line 120 of file format.inl.
integer tabSize |
The tab positions are multiples of this value.
Definition at line 107 of file format.inl.
|
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 131 of file format.inl.