String.padFront()

Signature

String padFront(String s1, int length, String padCharacter)

Domain

action, condition

Description

Returns a string front-padded to the indicated length with the pad character.

Parameters

NameTypeDescription
s1StringA String to pad.
lengthintLength of string.
padCharacterStringPad character.

Returns

TypeDescription
StringThe front-padded result String.

Cautions

none

Example


String result = String.padFront ("text", 7, "X");

Result is:
result : XXXtext