diff options
Diffstat (limited to 'memory/strncat.c')
-rw-r--r-- | memory/strncat.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/memory/strncat.c b/memory/strncat.c new file mode 100644 index 0000000..fb70ab8 --- /dev/null +++ b/memory/strncat.c @@ -0,0 +1,9 @@ +#include "memory.h" + +char *strncat(char *restrict destination, char const *restrict source, + size_t max_len) +{ + memcpy(destination + strlen(destination), source, + strnlen(source, max_len)); + return destination; +} |