-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_memcpy.c
20 lines (18 loc) · 1.04 KB
/
ft_memcpy.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_memcpy.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: gfoote <gfoote@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/04/02 20:49:50 by gfoote #+# #+# */
/* Updated: 2019/04/04 12:01:47 by gfoote ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void *ft_memcpy(void *dest, const void *src, size_t size)
{
while (size-- > 0)
((char *)dest)[size] = ((const char *)src)[size];
return ((void *)dest);
}