/* ************************************************************************** */ /* */ /* ::: o_ :::::: ::: */ /* ft_memcpy.c :+: / :+::+: :+: */ /* +:+ > +:++:+ +:+ */ /* By: whaffman +#+ +:+ +#++#++:++#++ */ /* +#+ +#+#+ +#++#+ +#+ \o/ */ /* Created: 2024/10/10 17:00:23 by whaffman #+#+# #+#+# #+# #+# | */ /* Updated: 2024/10/10 17:00:23 by whaffman ### ### ### ### / \ */ /* */ /* ************************************************************************** */ #include "libft.h" void *ft_memcpy(void *dest, const void *src, size_t n) { if (dest == NULL && src == NULL) return (NULL); while (0 < n--) ((unsigned char *)dest)[n] = ((unsigned char *)src)[n]; return (dest); }