shithub: scc

ref: 9e7b8848343bdb7e2a44c5273dd7766353fdac2e
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;
}