Page 1 of 1

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

Posted: Sun Jul 26, 2020 2:24 pm
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?

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

Posted: Sun Jul 26, 2020 3:55 pm
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

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

Posted: Sun Jul 26, 2020 8:56 pm
by zekeriye
Thanks for your great support.