trimBlanks

trimBlanks(): String;

The trimBlanks method of the String primitive type returns a copy of the receiving string with blanks (spaces) trimmed from both ends of the receiver.

The following example shows the use of the trimBlanks method.

vars
    stringValue : String;
begin
    stringValue := '     some text     '.trimBlanks;
    write stringValue;            // Outputs 'some text'
end;