11.07.2015 Views

PicC 9.50 dsPIC Manual.pdf

PicC 9.50 dsPIC Manual.pdf

PicC 9.50 dsPIC Manual.pdf

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Library FunctionsSTRNCATSynopsis#include char * strncat (char * s1, const char * s2, size_t n)DescriptionThis function appends (catenates) string s2 to the end of string s1. At most n characters will becopied, and the result will be null terminated. s1 must point to a character array big enough to holdthe resultant string.Example#include #include voidmain (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 Alsostrcpy(), strcmp(), strcat(), strlen()207

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!