ref: 823acc68023d0d810d7d830f13da713625bc51f4 dir: /lib/c/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; }