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 Main;

Var

s, s1: String;

Begin

s := " abcdef ";

s1 := String.Trim(s);

End Sub Main;

After executing the example the "s1" variable will contain the abcdef value.

See also:

String