{Str为字符串,Source为要查找的字符,Target为替换为什么}function Replaceing(Str, Source, Target: string): string; var str_Temp:string; begin Result:=''; while pos(Source,Str)>0 do begin str_Temp:=copy(Str,1,pos(Source,Str)-1)+Target; Delete(str,1,pos(Source,Str)+length(Source)-1); Str:=str_Temp+Str; end; Result:=Str; end;
var str_Temp:string;
begin
Result:='';
while pos(Source,Str)>0 do
begin
str_Temp:=copy(Str,1,pos(Source,Str)-1)+Target;
Delete(str,1,pos(Source,Str)+length(Source)-1);
Str:=str_Temp+Str;
end;
Result:=Str;
end;