UtilLib
This commit is contained in:
+26
@@ -0,0 +1,26 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* 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);
|
||||
}
|
||||
Reference in New Issue
Block a user