|
noexcept |
Copies a zero-terminated source string of Unicode code points, including a terminating null code, to a destination buffer of a 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 code points, is specified by the value of cchDest. |
[in] | cchDest | is a size of the destination buffer in code points. |
[in] | pszSrc | is a pointer to a zero-terminated string to be copied into the buffer pointed by the value of pDest. |
The function behaves similarly to the strcpy_s function as specified in the ISO/IEC TR 24731-1 specifications and C11 standard. 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
ucpsnLen_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.