How to CHR(13) with replace them Chr(13)+CHR(10)

General TRichView support forum. Please post your questions here
Post Reply
zekeriye
Posts: 32
Joined: Thu Sep 15, 2005 8:09 pm
Location: Turkey
Contact:

How to CHR(13) with replace them Chr(13)+CHR(10)

Post by zekeriye »

Hi;

I have got documents. Which some of thems are contains CR and CR+LF line break. Some of them are contains only CR+LF line break.
RVDATA.ISParastart(itemno) function Returns false when line break is CR.
RVDATA.ISParastart(itemno) function Returns True when line break is CR+LF
RVEdit.SearchText(CR,..) function return false.

How can I find single char line break and replace them two char( CR+LF)
Cany any body help me to solve this problem?
Sergey Tkachenko
Site Admin
Posts: 17283
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: How to CHR(13) with replace them Chr(13)+CHR(10)

Post by Sergey Tkachenko »

TRichView document does not contain CR or LF. So SearchText cannot find them.
Text is organized in paragraph, for the first paragraph item both IsParaStart() and IsFromNewLine() returns True.
Some paragraphs may have hard line breaks (added with Shift+Enter). For the first item after a line break IsParaStart() returns False but IsFromNewLine() returns True.

See the example how to convert all line breaks to paragraph breaks:
https://www.trichview.com/forums/viewto ... 854#p28854
zekeriye
Posts: 32
Joined: Thu Sep 15, 2005 8:09 pm
Location: Turkey
Contact:

Re: How to CHR(13) with replace them Chr(13)+CHR(10)

Post by zekeriye »

Thanks for your great support.
Post Reply