f:format.padding

Formats a string using PHPs str_pad function. http://www.php.net/manual/en/function.str_pad.php

Properties

value

Variable type
String
Description
String to format
Default value
NULL
Mandatory
No

padLength

Variable type
Integer
Description
Length of the resulting string. If the value of pad_length is negative or less than the length of the input string, no padding takes place.
Default value
NULL
Mandatory
Yes

padString

Variable type
String
Description
The padding string.
Default value
Space
Mandatory
No

padType

Variable type
String
Description
Append the padding at this site (Possible values: right, left, both).
Default value
'right'
Mandatory
No

Examples

Defaults

<f:format.padding padLength="10">TYPO3</f:format.padding>

TYPO3     (note the trailing whitespace)

Specify padding string

<f:format.padding padLength="10" padString="-=">TYPO3</f:format.padding>

TYPO3-=-=-

Specify padding type

<f:format.padding padLength="10" padString="-" padType="both">TYPO3</f:format.padding>

--TYPO3---