How to find LineFeeds?

  • Hello

    How can I find these?

    Julian gave me the following code for finding and deleting them in v4 but the find method no longer works.

    if RichText.Find(#10,False) then
    repeat
    RichText.InputString(#127); //This deletes the next character
    until not RichText.FindNext;
    RichText.Refresh;

    Thanks.

    Rob.

  • OK

    If I use the following it seems to work:

    RichText.Finder.ReplaceAll(#10, '');

    Please advise if this is not the best way.

    When using the Finder, if I wanted to find the first occurance of a string how would I do it?

    Thanks.

    Rob.

    • Offizieller Beitrag

    Hi,

    a #10 code is just a character so RichText.Finder.ReplaceAll(#10, '') will work. There can be a problem if at the found location should be a space so RichText.Finder.ReplaceAll(#10, #32) might be better.

    The #13 is (still) not a character so the above can not be used for #13 codes. Here use the procedure TParagraph.DeleteParagraphEnd to combine one paragraph with the next.

    Julian