문자열(CString)에서 특정한 문자 찾기

 

  • Find() 함수 
    • 문자열에서 특정한 문자의 순서를 리턴함, 단 특정한 문자가 없을지 -1을 리턴함
	CString temp = _T("abc");
	int tempint = temp.Find(_T("a")); //0
	tempint = temp.Find(_T("b")); //1
	tempint = temp.Find(_T("c")); //2
	tempint = temp.Find(_T("d")); //-1 

 

+ Recent posts