CHString::Collate method (chstring.h)
[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 Collate method uses the wcscoll function to compare a CHString string with another string.
Syntax
int Collate(
LPCWSTR lpsz
);
Parameters
lpsz
The other string used for comparison.
Return value
The Collate method returns the following values.
Remarks
The Collate method performs a case-sensitive comparison of the strings according to the code page currently in use.
Examples
The following code example shows how to use CHString::Collate:
CHString str1 = L"co-op";
CHString str2 = L"con";
int n;
// collation uses language rules, such as ignoring dashes
n = str1.Collate(str2);
assert(n > 0);
// comparison is a strict ASCII comparison with no language rules
n = str1.Compare(str2);
assert(n < 0);
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista |
Minimum supported server | Windows Server 2008 |
Target Platform | Windows |
Header | chstring.h (include FwCommon.h) |
Library | FrameDyn.lib |
DLL | FrameDynOS.dll; FrameDyn.dll |