27 lines
1.1 KiB
C
27 lines
1.1 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_memcpy.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: yantoine <marvin@42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2023/11/07 11:03:13 by yantoine #+# #+# */
|
|
/* Updated: 2023/11/09 12:15:15 by yantoine ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "libft.h"
|
|
|
|
void *ft_memcpy(void *dest, const void *src, size_t n)
|
|
{
|
|
size_t index;
|
|
|
|
index = 0;
|
|
while (index < n)
|
|
{
|
|
*(unsigned char *)(dest + index) = *(unsigned char *)(src + index);
|
|
index++;
|
|
}
|
|
return (dest);
|
|
}
|