-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_memcpy.c
30 lines (27 loc) · 1.13 KB
/
ft_memcpy.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_memcpy.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: dpylypen <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/11/22 20:06:09 by dpylypen #+# #+# */
/* Updated: 2016/12/02 17:34:15 by dpylypen ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void *ft_memcpy(void *destination, const void *source, size_t num)
{
char *des;
char *src;
size_t n;
des = (char *)destination;
src = (char *)source;
n = 0;
while (n < num)
{
*(des + n) = *(src + n);
n++;
}
return (destination);
}