$$pad
Pad a provided string with a certain character(s) repeated until a certain width of output string
(Strings longer than width
will be returned as-is)
Usage​
"$$pad(<direction>,<width>,[character]):{input}"
Returns​
string
Arguments​
Argument | Type | Values | Required / Default Value | Description |
---|---|---|---|---|
direction | Enum | LEFT (/START )/RIGHT (/END ) | Yes | On which side of the input to pad |
width | integer | Yes | What is the maximum length of the output string | |
character | string | "0" | The character(s) to pad with (0 is the default) |
Examples​
Input
Definition
Output
123
"$$pad(START,5):$"
"00123"
"TEST"
"$$pad(END,10,XY):$"
"TESTXYXYXY"