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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to find a word in CString?

Status
Not open for further replies.

Bartec

Programmer
Jan 21, 2005
54
0
0
PL
Hi!
I know that I can use Find method but it gives me only the first instance of looking word. I want to find as many as there are ( in my CString)

thanks for your resposne

Bartek
 
Use Find in conjunction with a while loop, using one plus the index where it found the word the previous time as the new starting index.
 
Use a loop and take advantage of the second parameter for Find() that takes a start value by giving it the location of the previously found search string.
 
At least they show the post time now so everybody can see I was only a minute late :).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top