I've looked through the CString class in afx.h and can't find anything that finds a word or character.
I found these:
But none of these do what I'm looking for, and the always seem to return a positive number.Code:// find character starting at left, -1 if not found int Find(TCHAR ch) const; // find character starting at right int ReverseFind(TCHAR ch) const; // find character starting at zero-based index and going right int Find(TCHAR ch, int nStart) const; // find first instance of any character in passed string int FindOneOf(LPCTSTR lpszCharSet) const; // find first instance of substring int Find(LPCTSTR lpszSub) const; // find first instance of substring starting at zero-based index int Find(LPCTSTR lpszSub, int nStart) const;
I'm trying to find a function that will scan a CString for a word and return true if it found it, false if it didn't. Any help would be great =D




Reply With Quote