format.padding¶
Formats a string using PHPs str_pad
function.
See https://www.php.net/manual/en/function.str-pad.
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)