-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_memcpy.c
executable file
·26 lines (24 loc) · 1.06 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_memcpy.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: akalombo <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/05/19 11:55:01 by akalombo #+# #+# */
/* Updated: 2019/05/21 08:46:14 by akalombo ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void *ft_memcpy(void *s1, const void *s2, size_t size)
{
char *dest = s1;
const char *src = s2;
while (size--)
{
*dest = *src;
s1++;
s2++;
}
return (s1);
}