Reading in a text file paragraph by paragraph

General TRichView support forum. Please post your questions here
Post Reply
Hanno
Posts: 22
Joined: Sun Mar 05, 2006 12:28 pm

Reading in a text file paragraph by paragraph

Post by Hanno »

Hi,

I am reading in a text file that has tabs. I want to process each paragraph, i.e. line by line. Once I have loaded the text file into the TRichViewEdit, how to I retrieve each whole paragraph to a string, line by line? For example,
for i := 0 to number of paragraphs do begin
st := paragraph;
//do some processing on string.
end;
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

May be you can save the whole text in one string, then read substrings between CR+LF characters?
You can use functions from RVGetText.pas or RVLinear.pas
Hanno
Posts: 22
Joined: Sun Mar 05, 2006 12:28 pm

Post by Hanno »

OK thanks. I used a TStringList and loaded everything in there instead. Thanks.
Post Reply