- 人气:
- 放大
- 缩小
- 二维码
- 赞赏
delphi 字符串变形替换
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);
begin
Memo1.Text:=RemoveAcento('123123'); //结果abcabc
end;