Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

string find reverse?

Status
Not open for further replies.

tlhawkins

Programmer
Dec 28, 2000
797
US
Hi all,

I'm looking for a way to search for a substring from a starting point backwards. I'm in a TRichEdit component and I need to find the position of the previous carriage return.
chr(10) + chr(13)
and the following one. So what I want is the start and end of the line where the cursor (caret) is.

any ideas?
I was finding API calls that seemed to be able but it seemed a very long and involved way to find a single line.

help?
Thanks


 
TRichEdit.CaretPos property gives you the line number and position on the line. And the Lines property allows you to process the TRichEdit line by line. What more do you need?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top