Compares two null-terminated wide strings according to the current locale as defined by the LC_COLLATE
category.
Collation order is the dictionary order: the position of the letter in the national alphabet (its equivalence class) has higher priority than its case or variant. Within an equivalence class, lowercase characters collate before their uppercase equivalents and locale-specific order may apply to the characters with diacritics. In some locales, groups of characters compare as single collation units. For example, "ch" in Czech follows "h" and precedes "i", and "dzs" in Hungarian follows "dz" and precedes "g".
- Parameters
-
[in] | dest | wide string to compare against |
[in] | dmax | restricted maximum length of dest |
[in] | src | wide string to be compared to dest |
[in] | smax | restricted maximum length of src |
[out] | indicator | pointer to result indicator, greater than 0, equal to 0 or less than 0, if the string pointed to by dest is greater than, equal to or less than the string pointed to by src respectively. |
- Precondition
- Neither dest nor src shall be a null pointer.
-
indicator shall not be a null pointer.
-
dmax/smax shall not be 0
-
dmax/smax shall not be greater than RSIZE_MAX_WSTR
- Returns
- indicator (when the return code is OK)
- Return values
-
>0 | when dest greater than src |
0 | when strings the same |
<0 | when dest less than src |
EOK | when comparison is complete |
ESNULLP | when dest/src/indicator is NULL pointer |
ESZEROL | when dmax/smax = 0 |
ESLEMAX | when dmax/smax > RSIZE_MAX_WSTR |
- See also
- wcscmp_s(), strcoll_s(), strcasecmp_s()