strncpy function — Copies a string
char* strncpy(char* dst, const char* src, size_t n)
The strncpy
function copies
at most n
characters from the
null-terminated string src
to
dst
. If src
is shorter than dst
, null characters are appended to the
end so that exactly n
characters
are always written to dst
.
The return value is dst
.