The Padr()
function keeps appending a character to a value until a text length is reached.
Syntax
Padr(value, text_length, char)
Returns
A new text where a character is appended 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 append. If this value has more than 1 character, then the first character is taken.
Examples
Padr("forty-two", 15, ".") /* "forty-two......" */
Padr("forty-two", 2, ".") /* "forty-two" */
Padr("forty-two", -10, ".dot") /* "forty-two" */
Padr(42, 15, ".") /* "forty-two......" */
Padr(42, 15, ".dot") /* "forty-two......" */
Padr(42, 15, "") /* "forty-two " */