add: strlen

This commit is contained in:
starnakin 2024-09-06 23:08:29 +02:00
commit e0eb95588f

10
src/string/strlen.c Normal file
View File

@ -0,0 +1,10 @@
#include <stddef.h>
size_t strlen(const char *str)
{
const char *start = str;
while (*start != '\0')
start++;
return start - str;
}