safec
3.0
Safe C Library - ISO TR24731 Bounds Checking Interface
|
#include "safe_str_lib.h"
Functions | |
EXPORT errno_t | wcsncat_s (wchar_t *restrict dest, rsize_t dmax, const wchar_t *restrict src, rsize_t slen) |
The wcsncat_s function appends a copy of the wide string pointed to by src (including the terminating null wide character) to the end of the wide string pointed to by dest. More... | |
EXPORT errno_t wcsncat_s | ( | wchar_t *restrict | dest, |
rsize_t | dmax, | ||
const wchar_t *restrict | src, | ||
rsize_t | slen | ||
) |
The wcsncat_s function appends a copy of the wide string pointed to by src (including the terminating null wide character) to the end of the wide string pointed to by dest.
The initial character from src overwrites the null wide character at the end of dest.
All elements following the terminating null wide character (if any) written by wcsncat_s in the array of dmax wide characters pointed to by dest take unspeciļ¬ed values when wcsncat_s returns. With SAFECLIB_STR_NULL_SLACK defined the rest is cleared with 0.
[out] | dest | pointer to wide string that will be extended by src if dmax allows. The string is null terminated. If the resulting concatenated wide string is less than dmax, the remaining slack space is nulled. |
[in] | dmax | restricted maximum length of the resulting dest, including the null |
[in] | src | pointer to the wide string that will be concatenaed to string dest |
[in] | slen | maximum wide characters to append |
EOK | successful operation, all the wide characters from src null terminated. |
ESNULLP | when dest/src is NULL pointer |
ESZEROL | when dmax = 0 |
ESLEMAX | when dmax/slen > RSIZE_MAX_WSTR |
ESUNTERM | when dest not terminated |
ESOVRLP | when src overlaps with dest |