shithub: scc

ref: 08d10710ffe6dd68c327983b794f2d2dbe183441
dir: /src/libc/string/strnlen.c/

View raw version
#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;
}