feat: add ft_memcpy function

This commit is contained in:
2025-09-30 19:48:32 +02:00
parent 63d4127817
commit bfbee5b3a9
2 changed files with 28 additions and 0 deletions

18
ft_memcpy.c Normal file
View File

@@ -0,0 +1,18 @@
#include "libft.h"
void *ft_memcpy(void *dst, const void *src, size_t n)
{
size_t i;
char *srctmp;
char *dsttmp;
i = 0;
srctmp = (char *)src;
dsttmp = (char *)dst;
while (i < n)
{
dsttmp[i] = srctmp[i];
i++;
}
return (dst);
}