Trim(Source: String): String;
Source - source string.
The Trim method deletes all the spaces from the beginning and the end of the specified string.
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.
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: