Synopsis
errno_t strncat_s(char *restrict s1,
                  size_t s1max,
                  const char *restrict s2,
                  rsize_t n);
Description

strncat_s appends not more than n characters from the array pointed to by s2 to the end of the string pointed to by s1 whose size is supplied in s1max. A null character in s1 and characters that follow it are not appended. The initial character of s2 overwrites the null character at the end of s1. A terminating null character is always appended to the result. The parameters are checked for null pointer and overlapping cases. On error strncat_s stores null in the first element of s1 and the current constraint_handler is called.

strncat_s returns 0 on success and non-zero on failure.