PrePad¶
Pads a string at the beginning with a given character until it reaches the requested size.
Expands the input string to the requested size by prepending the padding character. If the input string is already at or above that size, it is returned unchanged.
Parameters¶
- 1 —
sizeMandatory — accepts: INT -
The size the input string should have after padding.
- 2 —
padCharOptional — accepts: STRING -
The character used to pad the string. Defaults to a single space.
Input type¶
STRING
Output type¶
STRING
Requires¶
- The padding character can only be a single character and not a string.
Examples¶
Left-pad to size 5 with zeros
Left-pad to size 10 with spaces