padBlanks

padBlanks(int: Integer): String;

The padBlanks method of the String primitive type returns a string of the length specified in the int parameter, consisting of the receiving string padded with appended (trailing) spaces.

If the string is longer than the integer value, it is not truncated but the whole string is returned.

The following example shows the use of the padBlanks method.

vars
    stringValue : String;
begin
    stringValue := 'Alfonso:';
    write stringValue.padBlanks(10) & '123 Sesame St.';
    // Outputs 'Alfonso:  123 Sesame St.'
end;