String.Space

Syntax

Space(Number: Integer): String;

Parameters

Number. Number of spaces.

Description

The Space method returns the string with the specified number of spaces.

Comments

To exclude spaces from the source string, use the String.Trim, String.TrimEnd, String.TrimStart methods.

Example

Sub UserProc;
Var
    s: String;
    i: Integer;
Begin
    i := 
4;
    
// Display spaces
    s := String.Space(i);
    Debug.WriteLine(
"Space(" + i.ToString + ") = " + s);
End Sub UserProc;

After executing the example the string with four spaces is displayed in the console window.

See also:

String