Page 1 of 1

Plain text for Word Count

Posted: Sat Dec 13, 2025 4:20 pm
by joeb545
I want to display a word count in my application. I have an algorithm to calculate this that requires plain text. How do I get plain text from a TRichViewEdit?

Re: Plain text for Word Count

Posted: Sat Dec 13, 2025 6:14 pm
by Sergey Tkachenko
See this topic for functions for calculating word count: viewtopic.php?t=13

As for plain text, there are several methods.
For this task, the best function is RVGetTextRange(rv, 0, RVGetTextLength(rv)) from RVLinear unit, see https://www.trichview.com/help/idh_rvlinear.html.
This function does not save text representation of non-text items (except for tables and tabs)

Re: Plain text for Word Count

Posted: Sat Dec 13, 2025 9:27 pm
by joeb545
Thanks. This works perfectly!