(Gast)
n/a Beiträge
|
AW: MEMO als FILE speichern mit LF anstatt CRLF
25. Nov 2016, 22:45
Demo:
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var i : Integer;
begin
for i := 0 to 19 do Memo1.Lines.Add(INTTOSTR(i));
end;
procedure TForm1.Button2Click(Sender: TObject);
var newStr : String;
begin
Label1.Caption:= Memo1.Text;
newStr:= Label1.Caption;
newStr := StringReplace(newStr,#$A,'',[rfReplaceAll]); // entweder
// newStr := StringReplace(newStr,#$D,'',[rfReplaceAll]); // oder
Label2.Caption:= newStr;
Application.ProcessMessages;
Memo2.Text:= Label2.Caption;
Application.ProcessMessages;
Memo2.Lines.SaveToFile('F:\Memo2.txt');
end;
|
|
Zitat
|