What should Trim do?

Prof. A Olowofoyeku (The African Chief) african_chief at bigfoot.com
Thu Dec 13 11:21:17 CET 2001

On 13 Dec 2001, at 1:41, Frank Heckenbach wrote:

> Martin Liddle wrote:
> > What should the trim function do?  It seems to me that under gpc it
> > removes trailing spaces from a string.  Under Delphi it removes leading
> > and trailing spaces.  Unfortunately I don't have any Turbo Pascal
> > documentation to hand (I assume trim is a Borlandism).
> Nope, it's EP (, and the correct behaviour is indeed to
> remove only trailing spaces.
> Since it's only a built-in function, not a keyword, it's easy to
> overload it in a Delphi compatibility unit if someone wants Delphi's
> incorrect behaviour ...

This is done in the GPC "sysutils" unit. You can download this from;

Best regards, The Chief
Prof. Abimbola Olowofoyeku (The African Chief)
Author of Chief's Installer Pro for Win32
Email: African_Chief at bigfoot.com

More information about the Gpc mailing list