写个函数
Function replace(str:string):String;
var i:integer;
begin
For i:=1 to Length(str) do
begin
if (Str[i]=#13) or (Str[i]=#10) then
Delete(Str,i,1);
end;
end;
function DeleteLineBreaks(const S: string): string;
var
Source, SourceEnd: PChar;
begin
Source := Pointer(S);
SourceEnd := Source + Length(S);
while Source < SourceEnd do
begin
case Source^ of
#10: Source^ := #32;
#13: Source^ := #32;
end;
Inc(Source);
end;
Result := S;
end;