?
Hallo !
Ja, dafür gibt es sogar eine sehr Komfortable Funktion.
Hier ne Einsatzmöglichkeit:
CString strText("Dies ist ein String, in dem ich das Wort Hersteller finden will.");
CString strSuche("Hersteller");
CString strMsg;
int i = strText.Find(strSuche);
if( i == -1 )
{
strMsg.Format("Schade, konnte das Wort %s nicht finden :-(",strSuche);
AfxMessageBox(strMsg);
}
else
{
strMsg.Format("Juhuu, habe das Wort %s beginnend an Position %i im String: % s gefunden !! :-)))",
strSuche, i, strText);
AfxMessageBox(strMsg);
}