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

Function strncpy

examples/stdlib.c:2681–2689  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2679}
2680
2681static char *strncpy(char *dst, const char *src, size_t n)
2682{
2683 size_t i;
2684 for (i = 0; i < n && src[i] != '\0'; i++)
2685 dst[i] = src[i];
2686 for (; i < n; i++)
2687 dst[i] = '\0';
2688 return dst;
2689}
2690
2691static char *strcpy(char *dst, const char *src)
2692{

Callers 1

test_stringFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_stringFunction · 0.68