Skip to main content
Skip table of contents

padLeft() Operation

Syntax

set aChangedString = aString.padLeft(character, length)
set aChangedString = padLeft(LITERAL, character, length)

Semantics

The string is padded to the length by adding the character on the left (start) of the string. If the string is already of the required size or larger, the string is returned unchanged.

Substitutables

aString

Can be any variable or object attribute having the type String.  

character

A single character.

length

Length of final string in characters.

LITERAL

String literal.

Examples

NONE
 set changedString = s1.padLeft("0", 10);
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.