From Clomosy Docs

Trims leading and trailing spaces and control characters from a string.
Trim removes leading and trailing spaces and control characters from the given string S.

Use TrimLeft or TrimRight to limit the operation to just one end of the string.

Example

const
  textValue = '      Letters     ';
{
  ShowMessage('/'+TrimLeft(textValue)+'/');
  ShowMessage('/'+TrimRight(textValue)+'/');
  ShowMessage('/'+Trim(textValue)+'/');
}

Output:

See Also