/
padLeft

padLeft



Function: padLeft()

Left pad a string to the given length with spaces (or character if provided).

Syntax

padLeft(string, length, [character])

ArgumentTypeDescription
stringStringThe string to be padded.
lengthIntegerThe length the string needs to be, including padded characters.
characterStringPadding character to be used.

Examples

padLeft(toString(in.Site),2,'0')

if in.Site = 1, padLeft() returns '01'.

See Also

Related content

switch
switch
Read with this
padLeft
padLeft
More like this
replaceAll
replaceAll
Read with this
padLeft
padLeft
More like this
split
split
Read with this
padLeft
padLeft
More like this