From Cppreference
|
|
|
|
|
char *strncpy( char *dest, const char *src, size_t count );
|
|
|
|
|
Copies the character string pointed to by src to character string, pointed to by dest. At most count characters are copied. If the limit is hit, the resulting character string is not null-terminated.
[edit] Parameters
dest
|
-
|
pointer to the character string to copy to
|
src
|
-
|
pointer to the character string to copy from
|
count
|
-
|
maximum number of characters to copy
|
[edit] Return value
dest
[edit] Example
[edit] See also
|
|
copies one string to another (function)
|
|
|
copies one buffer to another (function)
|