Download Manual - Digi-Key
Transcript
Library Functions
STRNCAT
Synopsis
#include <string.h>
char * strncat (char * s1, const char * s2, size_t n)
Description
This function appends (concatenates) string s2 to the end of string s1. At most n characters will be
copied, and the result will be null terminated. s1 must point to a character array big enough to hold
the resultant string.
Example
#include <string.h>
#include <stdio.h>
void
main (void)
{
char buffer[256];
char * s1, * s2;
strcpy(buffer, "Start of line");
s1 = buffer;
s2 = " ... end of line";
strncat(s1, s2, 5);
printf("Length = %d\n", strlen(buffer));
printf("string = \"%s\"\n", buffer);
}
See Also
strcpy(), strcmp(), strcat(), strlen()
242
Related documents
019P Manual - Digi-Key
032 Manual - Digi-Key
HI-TECH C for PIC10/12/16 User`s Guide
Manual - IS MU
The GSTOOL Manual - BSI
HI-TECH C for PIC10/12/16 User's Guide
Chameleon PIC User Manual Ver 1 ().
MVME5100 Single Board Computer Programmer`s Reference
Attachment to deliverable D4.2: User Manual
Installation Manual Privacy Wall & Decorative Panel Kit
Datasheet - Mouser Electronics
Allen-Bradley OS-9 Assembler-Linker