Delphi

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • Formatting text files

    0 answers - 858 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    How about a variation on this:
    procedure TForm1.Button1Click(Sender: T);
    var
    BadStuff: string;
    InText: TStringList;
    begin
    InText := TStringList.Create;
    try
    InText.LoadFromFile( ' input file ');
    BadStuff :=
    chr(10)+chr(13)+chr(10)+chr(13)+chr(10)+chr(13)+ch r(10)+chr(13);
    InText.Text := StringReplace(InText.Text,BadStuff,'',[rfReplaceAll]);
    InText.SaveToFile( ' new file ');
    finally
    InText.Free;
    end;
    end;
    You might need to checek the order in which the CR and LF chars are put
    in by your external program. Also you might find that using a memo
    control is quite slow compared to using a TStringList, unless you need
    to be able to see the text on the screen.
    Rob
    Delphi mailing list -Delphi (AT) elists (DOT) org

Re: Formatting text files


max 4000 letters.
Your nickname that display:
In order to stop the spam: 0 + 0 =
QUESTION ON "Delphi"

EMSDN.COM