Anybody know of a function that can remove (normalize) a string by remove all beginning and ending whitespace
uses SysUtils; S:=Trim(S);
as well as replace all repeated spaces with a single space.
uses StrUtils; S:=DelSpace1(S);
A bonus would be to remove tabs and newlines chars as well
I would convert them to spaces and let the functions above have them... for i:=1 to length(S) do if ( S[i] in [#9..#13] ) then S[i]:=#32; - Jeff _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal