The strncpy function

Name

strncpy -- Copy a string

Synopsis

#include <string.h>

void *strncpy (char *s1, char *s2, size_t n);

Description

The strncpy function copies not more than n characters (characters that follow a null character are not copied) from the array pointed to by s2 to the array pointed to by s1. If copying takes place between objects that overlap, the behavior is undefined.

Returns

The strncpy function returns the value of s1.

Implementation Notes

None