/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_memcpy.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: narnaud +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2021/10/22 15:16:47 by narnaud #+# #+# */ /* Updated: 2022/03/24 09:22:49 by narnaud ### ########.fr */ /* */ /* ************************************************************************** */ #include "../libft.h" void *ft_memcpy(void *dst, const void *src, size_t n) { size_t i; i = 0; if (!src && !dst) return (NULL); while (i < n) { *(char *)(dst + i) = *(char *)(src + i); i++; } return (dst); }