function RemoveWhiteSpaces(const S: String): String;
var
I: Integer;
ch: Char;
begin
result := '';
for I:=1 to Length(S) do
begin
ch := S[I];
if ch = ' ' then begin end
else if ch = #9 then begin end
else
result := result + ch;
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
showmessage(RemoveWhiteSpaces(' abc1 23 @16 3.c om ')); //结果 abc123@163.com
end;