strPad¶
This property returns the input value padded to a certain length. The
padding is added on the left side, the right side or on both sides.
str
uses the PHP function str_pad()
for the operation.
Properties¶
length¶
padWith¶
-
pad
¶With -
The character(s) to pad with. The value of
pad
may be truncated, if the required number of padding characters cannot be evenly divided by the length of the value ofWith pad
. Note that leading and trailing spaces ofWith pad
are stripped! If you want to pad with spaces, omit this option.With
type¶
Examples¶
10 = TEXT
# The input value is 34 signs long.
10.value = TYPO3 - inspiring people to share.
10.value.strPad {
length = 37
padWith = =
type = both
}
Copied!
This results in "=TYPO3 - inspiring people to share.==".