blob: 1641a6714849383ec9da64fdaa064426a682783a [file] [log] [blame] [raw]
#include <string.h>
size_t strnlen(const char *s, size_t maxlen){
const char *start = s;
while(maxlen-- > 0 && s) s++;
return s - start;
}