|
noexcept |
Copies a zero-terminated source string, including a terminating null character, to a destination buffer of the specified size.
[out] | pDest | is a pointer to the destination buffer where the source string is to be copied to. A size of the buffer, in bytes, is specified by the value of cchDest. |
[in] | cchDest | is a size of the destination buffer in bytes. |
[in] | pszSrc | is a pointer to a zero-terminated string to be copied into the buffer pointed by the value of pDest. |
The function implements the behaviour of the strcpy_s function as specified in the ISO/IEC TR 24731-1 standards. This includes the following runtime constraints:
cchDest must neither equal zero nor be greater than RSIZE_MAX nor be less or equal to a value returned by a call
strnLen_s(pszSrc, cchDest).
If any of these constraints is violated the function generates a corresponding assertion and, if execution is allowed to continue, returns a corresponding errno code. If pDest is not NULL and cchDest is neither zero not greater than RSIZE_MAX, the function sets pDest[0] to '\0'.