LeftPad Function - microsoft/MIMWAL GitHub Wiki

Syntax

string LeftPad(value:string, length:int, padding:char)

Description

Returns a new string that is equivalent to string specified in the first input parameter, but right-aligned and padded on the left with as many padding characters as needed to create the specified length.

Remarks

If the second input parameter (length) or the third input parameter (padding char) is null, an exception is thrown. If the first parameter value is null, the function returns a null value.

Supported Version

1.0.0.0 and later

Examples

LeftPad([//Target/EmployeeID],8,"0")