]> pd.if.org Git - pdclib/blobdiff - functions/string/strcat.c
Added some of <string.h>.
[pdclib] / functions / string / strcat.c
diff --git a/functions/string/strcat.c b/functions/string/strcat.c
new file mode 100644 (file)
index 0000000..422565d
--- /dev/null
@@ -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;
+}