I work with Delphi XE6.
I used to use this code to remove whitespace from a string:
function RemoveWhitespace(S: string): string;
begin
Result := StringReplace(S, ' ', '', [rfReplaceAll]);
end;
But now I realized it only removes spaces. (I had a similar problem in C#.)