blob: 70837bc6a3e69d2a80b859906e306cd40fbd21ea (
plain)
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: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/10/07 10:00:07 by cacharle #+# #+# */
/* Updated: 2019/11/20 03:20:29 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void *ft_memcpy(void *dest, const void *src, size_t n)
{
if (dest == src)
return (dest);
while (n-- > 0)
*((t_byte*)dest + n) = *((t_byte*)src + n);
return (dest);
}
|