TrimEnd(Source: String): String;
Source - source string.
The TrimEnd method deletes all the spaces from the end of the specified string.
For details about characters that are included into category of spaces see in MDSN in description of the String.Trim method.
Sub Main;
Var
s, s1: String;
Begin
s := " abcdef ";
s1 := String.TrimEnd(s);
End Sub Main;
After executing the example the "s1" variable will contain the abcdef value.
See also: