Query: strncpy
OS: osf1
Section: 9r
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
strncpy(9r) strncpy(9r)NAMEstrncpy - General: Copies a null-terminated character string with a specified limitSYNOPSISchar * strncpy( char *s1, char *s2, int n );ARGUMENTSSpecifies a pointer to a buffer of at least n bytes. Specifies a pointer to a string (an array of characters terminated by a null charac- ter). Specifies the number of characters to be copied.DESCRIPTIONThe strncpy routine copies string s2 to buffer s1. The routine stops copying after it copies a null character or n characters, whichever comes first. If the length of s2 as determined by the null character is less than n, the routine pads s1 with null characters.RETURN VALUESThe strncpy routine returns a pointer to /NULL at the end of the first string (or to the location following the last copied character if there is no NULL). The copied string will not be null terminated if the length of s2 is n characters or more.SEE ALSORoutines: bcopy(9r), blkclr(9r), copystr(9r), ovbcopy(9r), strcpy(9r) strncpy(9r)
Related Man Pages |
---|
strncpy(3) - redhat |
string(3) - v7 |
copystr(9r) - osf1 |
strcpy(9f) - sunos |
strncpy(9f) - sunos |