Compares buffers of wide chars until they differ, and return 0 if the same or -1 or 1 in diff.
- Parameters
-
| dest | pointer to wchar_t buffer to compare against |
| src | pointer to the source wchar_t buffer to compare with dest |
| dmax | maximum length of dest, in number of wchar_t |
| smax | length of the source memory block |
| *diff | pointer to the diff which is -1, 0 or 1 according to whether the object pointed to by dest is greater than, equal to or less than the object pointed to by src. Note that musl returns the diff here. |
- Precondition
- Neither dest nor src shall be a null pointer.
-
Neither dmax nor smax shall be 0.
-
dmax shall not be greater than RSIZE_MAX_WMEM.
-
smax shall not be greater than dmax.
- Return values
-
| EOK | when operation is successful |
| ESNULLP | when dest/src is NULL POINTER |
| ESZEROL | when dmax/smax = ZERO |
| ESLEMAX | when dmax/smax > RSIZE_MAX_WMEM |
| ESNOSPC | when dmax < smax |
- See also
- memcmp16_s(), memcmp32_s()