Check if CString contains specific Text MFC

c++, mfc

Solution

If you change your if statement to

if (a.Find (b) != -1)

then you get what you want.

Problem

I want to check if a String contains a specific Text. Something like this ``` CString a; CString b; if (a.Find (b)) { String a contains String b } ``` Can anyone help me? Im working with mfc

Original source