Next: wcslen, Previous: wcslcat, Up: Wchar strings

### 6.15 `wcslcpy`—copy a wide-character string to specified length

Synopsis

         #include <wchar.h>
         size_t wcslcpy(wchar_t *dst, const wchar_t *src, size_t siz);

Description
`wcslcpy` copies wide characters from src to dst such that up to siz - 1 characters are copied. A terminating null is appended to the result, unless siz is zero.

Returns
`wcslcpy` returns the number of wide characters in src, not including the terminating null wide character. If the return value is greater than or equal to siz, then not all wide characters were copied from src and truncation occurred.

Portability
No supporting OS subroutines are required.