The Padl()
function keeps prepending a character to a value until a text length is reached.
Syntax
Padl(value, text_length, char)
Returns
A new text where a character is prepended so many times so that a text length is reached.
Parameters
value
a text or a number.text_length
the number of charachters in the resulting text.char
the character to prepend. If this value has more than 1 character, then the first character is taken.
Examples
Padl("forty-two", 15, ".") /* "......forty-two" */
Padl("forty-two", 2, ".") /* "forty-two" */
Padl("forty-two", -10, ".dot") /* "forty-two" */
Padl(42, 15, ".") /* "......forty-two" */
Padl(42, 15, ".dot") /* "......forty-two" */
Padl(42, 15, "") /* " forty-two" */