strncpy — Copy a length-limited, C-string
char *strncpy(
)
char * dest
Where to copy the string to
const char * src
Where to copy the string from
size_t count
The maximum number of bytes to copy
The result is notNUL-terminated if the source exceedscount bytes.
NUL-terminated
count
In the case where the length ofsrc is less than that of count, the remainder ofdest will be padded withNUL.
src
dest
NUL