dead simple printf/sprintf implementation.
[lunaix-os.git] / lunaix-os / libs / libc / string / strcpy.c
diff --git a/lunaix-os/libs/libc/string/strcpy.c b/lunaix-os/libs/libc/string/strcpy.c
new file mode 100644 (file)
index 0000000..0649802
--- /dev/null
@@ -0,0 +1,14 @@
+#include <libc/string.h>
+
+char*
+strcpy(char* dest, const char* src) {
+    char c;
+    unsigned int i = 0;
+    while ((c = src[i]))
+    {
+        dest[i] = c;
+        i++;
+    }
+    dest[i] = '\0';
+    return dest;
+}
\ No newline at end of file