循环检查 uses StrUtils; var str,NewStr:string; begin NewStr:=''; str:='http://www.nbo98.com/nbo98_com_dj_music/moonlight.mp3'; while pos('&#',str)>0 do begin NewStr:=NewStr+leftstr(str,pos('&#',str)-1) + chr(StrToInt(copy(str,pos('&#',str)+2,pos(';',str)-pos('&#',str)-2))); str:=rightstr(str,Length(str)-pos(';',str)); end; NewStr:=NewStr+str; ShowMessage(NewStr); end;
uses StrUtils;
var
str,NewStr:string;
begin
NewStr:='';
str:='http://www.nbo98.com/nbo98_com_dj_music/moonlight.mp3';
while pos('&#',str)>0 do
begin
NewStr:=NewStr+leftstr(str,pos('&#',str)-1) + chr(StrToInt(copy(str,pos('&#',str)+2,pos(';',str)-pos('&#',str)-2)));
str:=rightstr(str,Length(str)-pos(';',str));
end;
NewStr:=NewStr+str;
ShowMessage(NewStr);
end;
#2楼:没找到FindFirstW、FindNextW。