ref: 381a14fc9775e9f2cabbac45a4586f55feefc39c 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; }