safec  3.2
Safe C Library - ISO TR24731 Bounds Checking Interface
wcsicmp_s.c File Reference
#include "safe_str_lib.h"
+ Include dependency graph for wcsicmp_s.c:

Functions

EXPORT errno_t wcsicmp_s (const wchar_t *restrict dest, rsize_t dmax, const wchar_t *restrict src, rsize_t smax, int *diff)
 Compares two wide strings case-folded, via wcsfc_s(), i.e. More...
 

Function Documentation

◆ wcsicmp_s()

EXPORT errno_t wcsicmp_s ( const wchar_t *restrict  dest,
rsize_t  dmax,
const wchar_t *restrict  src,
rsize_t  smax,
int *  diff 
)

Compares two wide strings case-folded, via wcsfc_s(), i.e.

case-folded and normalized, and returns if difference in the last parameter. The two strings may overlap.

Parameters
[in]destwide string to compare against
[in]dmaxrestricted maximum length of wide string dest
[in]srcwide string to be compared to dest
[in]smaxrestricted maximum length of wide string src
[out]diffpointer to result diff, greater than 0, equal to 0 or less than 0, if the dest is greater than, equal to or less than src respectively.
Precondition
Neither dest nor src shall be a null pointer.
diff shall not be a null pointer.
dmax/smax shall not be 0
dmax/smax shall not be greater than RSIZE_MAX_WSTR
Return values
EOKwhen comparison is complete
ESNULLPwhen dest/src/diff is NULL pointer
ESZEROLwhen dmax/smax = 0
ESLEMAXwhen dmax/smax > RSIZE_MAX_WSTR
See also
strcmp_s(), wcscmp_s(), wcsncmp_s(), wcsfc_s()