diff options
author | Marvin Borner | 2020-04-29 19:21:29 +0200 |
---|---|---|
committer | Marvin Borner | 2020-04-29 19:21:29 +0200 |
commit | 4546c75d685475d8b9f215b588364e1d1bbd0b79 (patch) | |
tree | 2077f72ad46dfe877f7febdd0692edc139fd7937 /src/userspace/libc/string/strcmp.c | |
parent | 396d7d303d3bf0e796d0c817883ec1dec928352a (diff) |
MUCH work in libc
Also cleaned up some syscalls etc
Diffstat (limited to 'src/userspace/libc/string/strcmp.c')
-rw-r--r-- | src/userspace/libc/string/strcmp.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/userspace/libc/string/strcmp.c b/src/userspace/libc/string/strcmp.c new file mode 100644 index 0000000..4282520 --- /dev/null +++ b/src/userspace/libc/string/strcmp.c @@ -0,0 +1,14 @@ +#include <stdint.h> +#include <string.h> + +char strcmp(char *a, char *b) +{ + if (strlen(a) != strlen(b)) + return 1; + + for (u8 i = 0; i < strlen(a); i++) + if (a[i] != b[i]) + return 1; + + return 0; +}
\ No newline at end of file |