本文整理自网络,侵删。
function RemoveAcento(aText : string) : string;const ComAcento = '1234567890'; SemAcento = 'abcdefghij';var x: Cardinal;begin; for x := 1 to Length(aText) do if (Pos(aText[x], ComAcento) <> 0) then aText[x] := SemAcento[ Pos(aText[x], ComAcento) ]; Result := aText;end;
procedure TForm1.Button1Click(Sender: TObject);beginMemo1.Text:=RemoveAcento('123123'); //结果abcabcend;
相关阅读 >>
更多相关阅读请进入《Delphi》频道 >>