What should Trim do?
frank at g-n-u.de
Thu Dec 13 01:41:26 CET 2001
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 (18.104.22.168), 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 ...
Frank Heckenbach, frank at g-n-u.de, http://fjf.gnu.de/
GPC To-Do list, latest features, fixed bugs:
More information about the Gpc