ref: 8b59286ef1d9bef6c2c7b248ab0b8072e25ec9cf dir: /sys/src/ape/lib/ap/gen/strnlen.c/
#include <string.h> size_t strnlen(const char *s, size_t maxlen) { size_t i; for (i = 0; i < maxlen && s[i] != '\0'; i++) ; return i; }