MCPcopy Create free account
hub / github.com/GJDuck/e9patch / strnlen

Function strnlen

examples/stdlib.c:2640–2646  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2638}
2639
2640static size_t strnlen(const char *s, size_t n)
2641{
2642 size_t m = 0;
2643 for (size_t i = 0; m < n && s[i] != '\0'; i++)
2644 m++;
2645 return m;
2646}
2647
2648static int strncmp(const char *s1, const char *s2, size_t n)
2649{

Callers 2

test_stringFunction · 0.85
parseNameFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_stringFunction · 0.68