format.padding¶
Formats a string using PHPs str_pad function.
Examples¶
Defaults:
<f:format.padding padLength="10">TYPO3</f:format.padding>
Output:
TYPO3 (note the trailing whitespace)
Specify padding string:
<f:format.padding padLength="10" padString="-=">TYPO3</f:format.padding>
Output:
TYPO3-=-=-
Specify padding type:
<f:format.padding padLength="10" padString="-" padType="both">TYPO3</f:format.padding>
Output:
--TYPO3---
Arguments¶
value¶
- DataType
- string
- Required
- true
- 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
- true
- Description
- The padding string
padType¶
- DataType
- string
- Default
- ‘right’
- Required
- true
- Description
- Append the padding at this site (Possible values: right,left,both. Default: right)