String.Trim

Syntax

Trim(Source: String): String;

Parameters

Source. Source string.

Description

The Trim method deletes all the spaces from the beginning and the end of the specified string.

Comments

This method uses the .NET Framework String.Trim method that deletes space characters defined in Unicode encoding. The list of characters that are included into category can be found in MDSN in description of the String.Trim method.

Example

Sub UserProc;
Var
    s, s1: String;
Begin
    s := " abcdef ";
    s1 := String.Trim(s);
End Sub UserProc;

After executing the example the "s1" variable contains the abcdef value.

See also:

String