malloc/subprojects/libft/ft_memcpy.c

22 lines
1 KiB
C
Raw Normal View History

2019-04-24 20:59:37 +03:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_memcpy.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: gtertysh <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/11/28 17:19:13 by gtertysh #+# #+# */
/* Updated: 2016/11/29 14:52:27 by gtertysh ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void *ft_memcpy(void *dst, const void *src, size_t len)
{
if (dst && src)
while (len--)
*((char *)dst++) = *((const char *)src++);
return (dst);
}