Skip to main content

Pad

Anatomy

<pad var="var" length="int" padding="(space)" type="chars">
string
</pad>

Description: PAD pads a value to a given length.

If the length is positive then the value is padded on the right, if it is negative then on the left. If the padding value is empty or the absolute length is less than or equal to the actual length of the value then no padding takes place.

Attributes

NameTypeDescriptionDefined By
varvarResult variable name pad
lengthintLength pad
paddingstringPadding value pad
typetypeMeasurement type pad

Results:

BindingTypePredicate
varstringN/A

Examples

Example

<output>
<pad length="-10" padding="0">123</pad>
</output>

<!-- 0000000123 -->