MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / strnlen

Function strnlen

libs/qhttpserver/http-parser/test.c:1702–1712  ·  view source on GitHub ↗

strnlen() is a POSIX.2008 addition. Can't rely on it being available so * define it ourselves. */

Source from the content-addressed store, hash-verified

1700 * define it ourselves.
1701 */
1702size_t
1703strnlen(const char *s, size_t maxlen)
1704{
1705 const char *p;
1706
1707 p = memchr(s, '\0', maxlen);
1708 if (p == NULL)
1709 return maxlen;
1710
1711 return p - s;
1712}
1713
1714size_t
1715strlncat(char *dst, size_t len, const char *src, size_t n)

Callers 2

strlncatFunction · 0.85
strlncpyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected