Files
UtilLib/ft_memcpy.c
T
2025-08-04 13:20:27 +02:00

27 lines
1.1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_memcpy.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: yantoine <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/07 11:03:13 by yantoine #+# #+# */
/* Updated: 2023/11/09 12:15:15 by yantoine ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void *ft_memcpy(void *dest, const void *src, size_t n)
{
size_t index;
index = 0;
while (index < n)
{
*(unsigned char *)(dest + index) = *(unsigned char *)(src + index);
index++;
}
return (dest);
}