blob: 6442eb793fbeeda51a3f19b9e1c1269a030444e9 [file] [log] [blame]
#include <string.h>
size_t strnlen(const char *s, size_t n)
{
const char *p = memchr(s, 0, n);
return p ? p-s : n;
}