X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fstring%2Fstrcat.c;fp=functions%2Fstring%2Fstrcat.c;h=422565d15c388d2583957bfbc4c1ae43d5cc2174;hb=c2f1367984ba4153d892062759c3813020b65a9a;hp=0000000000000000000000000000000000000000;hpb=3220f577b186e04180acd7554a785c60dfb7ebb2;p=pdclib diff --git a/functions/string/strcat.c b/functions/string/strcat.c new file mode 100644 index 0000000..422565d --- /dev/null +++ b/functions/string/strcat.c @@ -0,0 +1,22 @@ +/* $Id$ */ + +/* Release $Name$ */ + +/* strcat( char *, const char * ) + + This file is part of the Public Domain C Library (PDCLib). + Permission is granted to use, modify, and / or redistribute at will. +*/ + +#include <_PDCLIB_aux.h> + +char * strcat( char * _PDCLIB_restrict s1, const char * _PDCLIB_restrict s2 ) +{ + char * rc = s1; + if ( *s1 ) + { + while ( *++s1 ); + } + while ( (*s1++ = *s2++) ); + return rc; +}