Your Airkit journey starts here

PADSTRING

Pads a string with a given length, if the given string is longer than the length, the original string is returned.

Declaration

PADSTRING(base_string, pad_string, length, alignment) -> substring
PADSTRING(base_string, pad_string, length) -> substring

Parameters

base_string
string -The base string to pad.
pad_string
number -The string to use for padding.
length
number -The maximum length of the resulting string.
alignment
string -The direction to pad the string, RIGHT is the default.

Return Values

substring
string -The resulting substring taken from the baseString starting at the start index and ending at the end index or the end of the baseString.