I was wondering if the below is possible:
When the user clicks the button, the program takes all the text from Memo1.Lines and for each new line (in delphi, #13+#10) and replaces all new lines (#13+#10) with \line .
I have tried using the tutorial available on delphi.about.com:
procedure ParseDelimited(const sl : TStrings; const value : string; const delimiter : string) ; var dx : integer; ns : string; txt : string; delta : integer; begin delta := Length(delimiter) ; txt := value + delimiter; sl.BeginUpdate; sl.Clear; try while Length(txt) > 0 do begin dx := Pos(delimiter, txt) ; ns := Copy(txt,0,dx-1) ; sl.Add(ns) ; txt := Copy(txt,dx+delta,MaxInt) ; end; finally sl.EndUpdate; end; end;
but i'm no good with TStrings (confuses me ).
Any Ideas?
Regards
SirStorm25.


Sign In
Create Account

Back to top









