You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
1.1 KiB
28 lines
1.1 KiB
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_memcpy.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: narnaud <narnaud@student.42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2021/10/22 15:16:47 by narnaud #+# #+# */
|
|
/* Updated: 2021/11/15 09:00:15 by narnaud ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "libft.h"
|
|
|
|
void *ft_memcpy(void *dst, const void *src, size_t n)
|
|
{
|
|
size_t i;
|
|
|
|
i = 0;
|
|
if (!src && !dst)
|
|
return (NULL);
|
|
while (i < n)
|
|
{
|
|
*(char *)(dst + i) = *(char *)(src + i);
|
|
i++;
|
|
}
|
|
return (dst);
|
|
}
|
|
|