1.TH strncpy 3 scc\-VERSION2.SH NAME3strncpy - copy a string with a length limit4.SH SYNOPSIS5#include <string.h>67char *strncpy(char *restrict s1, const char *restrict s2, size_t n)8.SH DESCRIPTION9The10.BR strncpy ()11function copies at most12.I n13characters from the array at14.I s215into the array at16.IR s1 .17Characters that follow a null byte in18.I s219are not copied.20.PP21Overlapping source and destination regions produce undefined behavior.22.PP23When the string at24.I s225is shorter than26.I n27characters, the remaining positions in28.I s129are filled with null bytes until exactly30.I n31bytes have been written.32.PP33When34.I n35is zero, nothing is copied.36.SH RETURN VALUE37The38.BR strncpy ()39function returns its first argument,40.IR s1 .41.SH STANDARDS42ISO/IEC 9899:1999 Section 7.21.2.4