31 lines
1.1 KiB
C
31 lines
1.1 KiB
C
|
/* ************************************************************************** */
|
||
|
/* */
|
||
|
/* ::: :::::::: */
|
||
|
/* ft_memcpy.c :+: :+: :+: */
|
||
|
/* +:+ +:+ +:+ */
|
||
|
/* By: gbrochar <marvin@42.fr> +#+ +:+ +#+ */
|
||
|
/* +#+#+#+#+#+ +#+ */
|
||
|
/* Created: 2015/11/25 14:42:55 by gbrochar #+# #+# */
|
||
|
/* Updated: 2015/11/25 14:43:02 by gbrochar ### ########.fr */
|
||
|
/* */
|
||
|
/* ************************************************************************** */
|
||
|
|
||
|
#include "libft.h"
|
||
|
|
||
|
void *ft_memcpy(void *dst, const void *src, size_t n)
|
||
|
{
|
||
|
size_t i;
|
||
|
unsigned char *dst_byte;
|
||
|
const unsigned char *src_byte;
|
||
|
|
||
|
i = 0;
|
||
|
dst_byte = dst;
|
||
|
src_byte = src;
|
||
|
while (i < n)
|
||
|
{
|
||
|
dst_byte[i] = src_byte[i];
|
||
|
i++;
|
||
|
}
|
||
|
return (dst);
|
||
|
}
|