]> pd.if.org Git - pdclib/blobdiff - functions/string/strcpy.c
Added some of <string.h>.
[pdclib] / functions / string / strcpy.c
diff --git a/functions/string/strcpy.c b/functions/string/strcpy.c
new file mode 100644 (file)
index 0000000..18fc91e
--- /dev/null
@@ -0,0 +1,18 @@
+/* $Id$ */
+
+/* Release $Name$ */
+
+/* strcpy( 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 * strcpy( char * _PDCLIB_restrict s1, const char * _PDCLIB_restrict s2 )
+{
+    char * rc = s1;
+    while ( ( *s1++ = *s2++ ) );
+    return rc;
+}