feat: brk and sbrk (mmap based)
[lunaix-os.git] / lunaix-os / usr / libc / string.c
index 2e34dc7460cfa65a2a22d2c606c08a6649a43fd3..280cbbe3c8b18fea2440d3010293a1aa3f3acfd6 100644 (file)
@@ -41,4 +41,17 @@ strncpy(char* dest, const char* src, size_t n)
     while (i <= n)
         dest[i++] = 0;
     return dest;
-}
\ No newline at end of file
+}
+
+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;
+}