Newer
Older
Scratch / lockwasher / src / lib / libc / string / strlen.c
@Christopher W. Olsen Christopher W. Olsen on 25 Oct 2019 186 bytes Scratch
#include <sys/types.h>
#include <string.h>

int strlen(const char * string)
{
    int i = 0;
    
    while (1)
    {
	if (string[i] == '\0')
	    return i;
	i++;
    }

    return 0;
}