ref: 27e63021261aee56e2195e328c9e4ab61bce8870 dir: /src/libc/string/strnlen.c/
#include <string.h> #undef strnlen size_t strnlen(const char *s, size_t maxlen) { size_t n; for (n = 0; n < maxlen && *s++; ++n) ; return n; }