ref: 8c20e677d7728c5120feb182e4d4195a7571fa71 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; }