String.leftPad

Syntax

PP.String.leftPad(string: String, size: Number, character: String);

Parameters

string. Source string.

size. Minimum length of the string.

character. Character to pad the empty space on the left. This is an optional parameter, by default the white space is used.

Description

The leftPad static method adds missing number of characters in the beginning of the string.

Comments

This method returns a String-type value.

Example

The example of use is given in the with description of the String.ellipsis method.

See also:

PP