[The CHString class is part of the WMI Provider Framework which is now considered in final state, and no further development, enhancements, or updates will be available for non-security related issues affecting these libraries. The MI APIs should be used for all new development.]
The Compare method uses the wcscmp function to compare this CHString string with another string.
int Compare( LPCWSTR lpsz );
The other string used for comparison.
The Compare method returns the following values.
The Compare method, which performs a case-sensitive comparison of the strings, is not affected by locale.
The following code example shows the use of CHString::Compare:
CHString s1( L"abc" ); CHString s2( L"ABC" ); assert( s1.Compare( s2 ) > 0 ); // Compare with another CHString. assert( s1.Compare( L"abc" ) == 0 ); // Compare with LPCWSTR string.
|Minimum supported client||Windows Vista|
|Minimum supported server||Windows Server 2008|
|Header||chstring.h (include FwCommon.h)|