feat: shell and signal demo as loadable user executable
[lunaix-os.git] / lunaix-os / usr / libc / string.c
index 280cbbe3c8b18fea2440d3010293a1aa3f3acfd6..726437c15a27be883ee4791aed3af876db1c9965 100644 (file)
@@ -55,3 +55,13 @@ strcpy(char* dest, const char* src)
     dest[i] = '\0';
     return dest;
 }
     dest[i] = '\0';
     return dest;
 }
+
+int
+strcmp(const char* a, const char* b)
+{
+    while (*a && *a == *b) {
+        a++;
+        b++;
+    }
+    return *a - *b;
+}
\ No newline at end of file