Functions Language

PadLeft

The Padleft() function adds specified characters to the front of a string until it reaches a specified length.

Related functions: PadRight

Syntax


Padleft (String, Length, PadChar)

String The input text
Length The total length of the output string in characters
PadChar The character to add to the front of the string until it reaches the required length

Note:

If the input string is longer than the required final length, the original input string is returned unaltered.

Examples


Function Output
Padleft(“ABC”, 5, “0”) 000ABC
Padleft(“123”, 10 , “X”) XXXXXXX123
Padleft(“QQQQQ”,3,”@”) QQQQQ
Padleft(“”, 5, “8”) 88888