Pascal Scripting: Trim

Prototype:

function Trim(const S: string): String;

Description:

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