strncat()

concatenate part of two strings 

Function


SYNOPSIS

#include <string.h>

char *strncat(char *s1, const char *s2, size_t n);


DESCRIPTION

The strncat() function appends up to n characters from string s2 to string s1, and then appends a terminating null character. The initial character of s2 overwrites the null character at the end of s1. Subsequent characters in s2 are appended to s1 until either the end of s2 is reached or n characters have been copied. If copying takes place between objects that overlap, the behavior is undefined.

The function strncat() does not allocate any storage. The caller must insure that the buffer pointed to by s1 is long enough to hold the added characters.


PARAMETERS

s1 

Is the null terminated string to be modified.

s2 

Is the null terminated string to be copied to the end of s1.

n 

Is the maximum number of characters to append.


RETURN VALUES

The strncat() function returns the value of s1.


CONFORMANCE

ANSI/ISO 9899-1990.


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

None.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
strcat(), strcpy(), strncpy()


PTC MKS Toolkit 10.3 Documentation Build 39.