procedure TForm1.Button1Click(Sender: TObject);
var
pC: PChar;
I : Integer;
begin
with TFileStream.Create('./A.txt', fmOpenReadWrite) do
begin
if Size > 0 then
begin
GetMem(pC, Size);
Seek(0, 0);
Read(pC^, Size);
for I := 0 to Size - 1 do
if pC = #20 then
pC := #0;
Seek(0, 0);
Write(pC^, Size);
FreeMem(pC);
end;
Free;
end;
end;