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

Functions

EXPORT errno_t wcsset_s (wchar_t *restrict dest, rsize_t dmax, wchar_t value)
 Sets maximal dmax wide characters of dest to a wide character value, but not the final NULL character. More...
 

Function Documentation

◆ wcsset_s()

EXPORT errno_t wcsset_s ( wchar_t *restrict  dest,
rsize_t  dmax,
wchar_t  value 
)

Sets maximal dmax wide characters of dest to a wide character value, but not the final NULL character.

With SAFECLIB_STR_NULL_SLACK defined all elements following the terminating null character (if any) written in the array of dmax wide characters pointed to by dest are nulled.

Remarks
EXTENSION TO
  • ISO/IEC TR 24731, Programming languages, environments and system software interfaces, Extensions to the C Library, Part I: Bounds-checking interfaces
  • Implemented in the Windows secure API as _wcsset_s()
Parameters
[out]destwide string that will be set.
[in]dmaxrestricted maximum length of dest
[in]valuewide character value to write
Return values
EOKwhen successful
ESNULLPwhen dest is NULL pointer
ESZEROLwhen dmax = 0
ESLEMAXwhen dmax > RSIZE_MAX_WSTR
See also
wcsnset_s(), wmemset_s(), strzero_s(), strnset_s(), strispassword_s()