CString::CompareNoCase
This method compares this CString object with another string using the lstrcmpi function.
The current locale is used to get the correct language-specific sort ordering.
int CompareNoCase(
LPCTSTR lpsz )
const;
Parameters
- lpsz
Specifies the other string used for comparison.
Return Value
Zero if the strings are identical (ignoring case), <0 if this CString object is less than lpsz (ignoring case), or > 0 if this CString object is greater than lpsz (ignoring case).
Example
The following example demonstrates the use of CString::CompareNoCase.
// example for CString::CompareNoCase
CString s1("abc");
CString s2("ABD");
ASSERT(s1.CompareNoCase(s2) == -1); // Compare with a CString.
ASSERT(s1.Compare(_T("ABE")) == -1); // Compare with LPTSTR string.
Requirements
Windows CE versions: 1.0 and later
Header file: Declared in Afx.h
Platform: H/PC Pro, Palm-size PC, Pocket PC