-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_memcpy.c
More file actions
27 lines (24 loc) · 1.11 KB
/
ft_memcpy.c
File metadata and controls
27 lines (24 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_memcpy.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tdehne <tdehne@student.42heilbronn.de> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/03/26 14:56:56 by tdehne #+# #+# */
/* Updated: 2022/04/04 15:43:15 by tdehne ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void *ft_memcpy(void *dest, const void *src, size_t n)
{
char *dest_c;
char *src_c;
if (dest == src)
return (dest);
dest_c = (char *) dest;
src_c = (char *) src;
while (n--)
*dest_c++ = *src_c++;
return (dest);
}