Autor Beitrag
NoVeK
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 20



BeitragVerfasst: So 05.12.04 22:41 
Weiß einer wie ich ein bestimmtes Zeichen wie x durch eine Neue Zeile (Wie Enter Taste) ersetze?
herzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 168

WINXP pro, SUSE Linux 9.0
D7 Pers.
BeitragVerfasst: Mo 06.12.04 14:29 
ausblenden Delphi-Quelltext
1:
uses JclStrings;					


ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure TForm1.Button1Click(Sender: TObject);
var
  a:String;
begin
  a:=memo1.Text;
  StrReplace(a,'e','a',[rfIgnoreCase, rfReplaceAll]);
  memo1.Text:=a;
end;
Maa83
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 160

Win XP Pro
D6 Ent
BeitragVerfasst: Mo 06.12.04 14:41 
du kannst auch einfach die Methode StringReplace aus SysUtils verwenden.
Dein Beispiel wäre dann:

StringReplace(tmpText,'x',#13#10,[rfReplaceAll]);

wobei tmpText dein Text ist