Implemented some basic libc functions and a text console

This commit is contained in:
2022-12-21 08:29:33 +00:00
parent f59d67435d
commit 8475a6139e
30 changed files with 1898 additions and 0 deletions

13
libc/string/strrchr.c Normal file
View File

@@ -0,0 +1,13 @@
#include <socks/libc/string.h>
char *strrchr(const char *str, int c) {
size_t len = strlen(str);
for (int i = len - 1; i > 0; i--) {
if (str[i] == c) {
return (char *)&str[i];
}
}
return NULL;
}