all kernel headers have been moved from include/mango to include/kernel and include definitions that are only relevant to kernel-space. any definitions that are relevant to both kernel- and user-space (i.e. type definitions, syscall IDs) have been moved to include/mango within libmango.
14 lines
243 B
C
14 lines
243 B
C
#include <kernel/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;
|
|
}
|