shithub: scc

ref: 51f244d2ec7cce0cd116df73b29e3c9ff5cc3425
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;
}