implement field width tag format option

This implements the possibility of specifying padding for numeric tags.
Both space and zero padding is supported.
This commit is contained in:
Leonardo Gibrowski Faé 2022-12-22 16:48:27 -03:00
parent 73ccafdade
commit 146759bd96
No known key found for this signature in database
GPG key ID: 9F85F3D45A51B992
3 changed files with 79 additions and 25 deletions

View file

@ -60,10 +60,20 @@ be used.
:[ *Kind*
:[ *Description*
:< *Applies to*
| [0]<number>[.]
: format
: The width reserved to the field. The leading '0' is optional and
indicates zero padding, as opposed to space padding. The trailing
'.' is also optional
: Numeric tags (integer and floats)
| .<number>
: format
: How many decimals to print
: Float tags
| [0]<N>[.]<M>
: format
: Combined version of the two previous formatters
: N: numeric tags, M: float tags
| hex
: format
: Renders a tag's value in hex