Attention
TYPO3 v10 has reached end-of-life as of April 30th 2023 and is no longer being maintained. Use the version switcher on the top left of this page to select documentation for a supported version of TYPO3.
Need more time before upgrading? You can purchase Extended Long Term Support (ELTS) for TYPO3 v10 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
true
- 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)