Copy the contents of a char*-string into another, the contents of s2 will be copied into s1.

Copy the contents of a char*-string into another, the contents of s2 will be copied into s1. Only a specified maximum number of characters are copied. The concluding 0 is automatically appended to the end of the string. The target string s1 must be long enough to accommodate the second string s2.

Name Type Default Description
Return Pointer to the target string s1    
s1 char* - Target string
s2 char* - Original string
len int - Maximum number of characters that are to be copied. The values doesn#t reflect the number of available byzes but the maximum length of the result.

The example appends the contents of a string, the length of which can vary to a maximum of 4 characters, to the string s1.

char		s1[5];
char	*	s2	= alloc (1000);
...s2 will be loaded
strncat (s1, s2, 4);

Since
Version 1.2.1 (12 September 2005)

Available
priint:comet InDesign® Plug-Ins, comet_pdf, Illustrator

See Also
strcpy
strcat
strncat

Alphabetic index HTML hierarchy of classes or Java