-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_memcpy.c
executable file
·22 lines (21 loc) · 1.05 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_memcpy.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tseguier <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2013/11/19 23:29:17 by tseguier #+# #+# */
/* Updated: 2014/03/27 18:39:16 by jcoignet ### ########.fr */
/* */
/* ************************************************************************** */
#include <string.h>
void *ft_memcpy(void *s1, const void *s2, size_t n)
{
while (n > 0)
{
--n;
*(((unsigned char *)s1) + n) = *(((unsigned char *)s2) + n);
}
return (s1);
}