Attention
TYPO3 v9 has reached its end-of-life September 30th, 2021 and is not maintained by the community anymore. Looking for a stable version? Use the version switch on the top left.
You can order Extended Long Term Support (ELTS) here: TYPO3 ELTS.
format.padding¶
Formats a string using PHPs str_pad
function.
See https://www.php.net/manual/function.str_pad.php.
Examples¶
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---
Arguments¶
value¶
- DataType
string
- Required
false
- Description
String to format
padLength¶
- DataType
mixed
- Required
false
- 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.
padString¶
- DataType
string
- Default
' '
- Required
false
- Description
The padding string
padType¶
- DataType
string
- Default
'right'
- Required
false
- Description
Append the padding at this site (Possible values: right,left,both. Default: right)