feat: added sling url decomposition

This commit is contained in:
2021-03-26 22:16:59 +01:00
parent f120b104e5
commit 8152ad6e9a
5 changed files with 104 additions and 0 deletions

View File

@@ -56,6 +56,19 @@ const char *strchr(const char *s, char c) {
}
}
const char *strrchr(const char *s, char c) {
int index = strlen(s);
while (1) {
if (s[index] == c) {
return &s[index];
}
if (index == 0) {
return NULL;
}
index--;
}
}
int memcmp(const void *s1, const void *s2, size_t n) {
uint8_t a, b;
for (size_t i = 0; i < n; ++i) {