String.PadRight

Syntax

PadRight(Source: String; Length: Integer; [PaddingChar: Char = " "]): String;

Parameters

Source. Source string.

Length. The length of the source string after adding characters (the length of the source string + the number of added characters).

PaddingChar. Added character.

Description

The PadRight method adds the specified number of characters specified in the PaddingChar parameter to the right of the source string passed by the Source parameter.

Example

Sub UserProc;
Var
    s, s1: String;
Begin
    s := "abcdef";
    s1 := String.PadRight(s, s.Length + 2'X');
End Sub UserProc;

After executing the example the "s" variable contains the abcdefXX value.

See also:

String