Base Scripting Language GuidePascal-Library Custom Scripting FunctionsTrimOn this pageTrimTrims leading and trailing spaces and control characters from a string. Structure Trim(string): string; Parameters Return value Description Trim removes leading and trailing spaces and control characters from the given string S.