shithub: scc

ref: 3d4872a5f32769876bac1dbe2e2efaa85b864851
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;
}