diff options
author | Joursoir <chat@joursoir.net> | 2021-08-02 22:30:23 +0000 |
---|---|---|
committer | Joursoir <chat@joursoir.net> | 2021-08-02 22:30:23 +0000 |
commit | 73ba11fe151f6e643f187f3abd22f1fe0fcb743e (patch) | |
tree | 8821b41af701d4e09e4e72d4099199ffaa44678f /kernel/string.c | |
parent | 39f626a5d0cf0f5db95e695d013b70a04c29348e (diff) | |
download | mfsos-73ba11fe151f6e643f187f3abd22f1fe0fcb743e.tar.gz mfsos-73ba11fe151f6e643f187f3abd22f1fe0fcb743e.tar.bz2 mfsos-73ba11fe151f6e643f187f3abd22f1fe0fcb743e.zip |
string: move strlen() here
Diffstat (limited to 'kernel/string.c')
-rw-r--r-- | kernel/string.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/string.c b/kernel/string.c new file mode 100644 index 0000000..d038c27 --- /dev/null +++ b/kernel/string.c @@ -0,0 +1,9 @@ +#include "string.h" + +size_t strlen(const char *str) +{ + size_t len = 0; + while(str[len]) + len++; + return len; +} |