本文整理自网络,侵删。
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);beginshowmessage(RemoveWhiteSpaces(' abc1 23 @16 3.c om ')); //结果 abc123@163.comend;
相关阅读 >>
idhttp相关:伪造来源地址、cookie欺骗、通过代理访问
Delphi 2009 之 tcategorypanelgroup[1]: chevronalignment 等
Delphi 接口尚未调用尚未调用coinitialize解决办法
更多相关阅读请进入《Delphi》频道 >>