The libc implementation
Martin ‘Solar’ Baute
Public Domain
char * strncpy(char * _PDCLIB_restrict s1,const char * _PDCLIB_restrict s2,size_t n)
Copies the null terminated string s2 to s1, up to n characters The remaining space, if any, is filled with zeroes
Returns the value of s1