scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

strncat.3 (788B)


      1 .TH strncat 3
      2 .SH NAME
      3 strncat - concatenate a string with a bounded portion of another
      4 .SH SYNOPSIS
      5 #include <string.h>
      6 
      7 char *strncat(char *restrict s1, const char *restrict s2, size_t n)
      8 .SH DESCRIPTION
      9 The
     10 .BR strncat ()
     11 function appends at most
     12 .I n
     13 bytes from the array at
     14 .I s2
     15 to the end of the string at
     16 .IR s1 .
     17 Null bytes and any bytes after them in
     18 .I s2
     19 are not appended.
     20 .PP
     21 The first byte of
     22 .I s2
     23 replaces the terminating null byte of
     24 .IR s1 .
     25 .PP
     26 A null terminator is always written after the last appended character.
     27 When
     28 .I n
     29 is zero, nothing is appended to
     30 .IR s1 .
     31 Overlapping source and destination regions produce undefined behavior.
     32 .SH RETURN VALUE
     33 The
     34 .BR strncat ()
     35 function returns its first argument,
     36 .IR s1 .
     37 .SH STANDARDS
     38 ISO/IEC 9899:1999 Section 7.21.3.2