Skip to main content

$$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​

ArgumentTypeValuesRequired / Default ValueDescription
directionEnumLEFT(/START)/RIGHT(/END)YesOn which side of the input to pad
widthintegerYesWhat is the maximum length of the output string
characterstring"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"