Microsoft DirectX 8.1 (C++) |
Compares two wide-character strings. The comparison is not case sensitive.
Syntax
int lstrcmpiW(
LPCWSTR lpszString1,
LPCWSTR lpszString2
);
Parameters
lpszString1
Pointer to the first null-terminated wide string to be compared.
lpszString2
Pointer to the second null-terminated wide string to be compared.
Return Value
Returns a negative value if the function succeeds and the string that lpszString1 points to is less than the string that lpszString2 points to. Returns a positive value if the string that lpszString1 points to is greater than the string that lpszString2 points to. Returns zero if the strings are equal.
Remarks
The lstrcmpiW function compares two wide strings by checking the first characters against each other, the second characters against each other, and so on until it finds an inequality or reaches the ends of the strings.
The function returns the difference of the values of the first unequal characters it encounters. For instance, lstrcmpiW determines that L"abcz" is greater than L"abcdefg" and returns the difference of L'z' and L'd'.
The language (locale) is treated as always being English.
See Also