Pascal Scripting: TrimRight

Prototype

function TrimRight(const S: String): String;

Description

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