/* * strnlen and strndup functions. * */ #include #include size_t strnlen (const char *s, size_t n) { int i; for (i=0; s[i] && i