String.pad()

Signature

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

Domain

action, condition

Description

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

Parameters

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

Returns

TypeDescription
StringThe padded result String.

Cautions

none

Example


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

Result is:
result : textXXX