-
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
/
Copy pathft_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: tmelvin <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/10/07 13:02:42 by tmelvin #+# #+# */
/* Updated: 2019/10/30 16:16:14 by tmelvin ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void *ft_memcpy(void *dst, const void *src, size_t n)
{
char *ch_dst;
const char *ch_src;
ch_dst = dst;
ch_src = src;
if (dst == NULL || src == NULL)
return (dst);
while (n--)
*ch_dst++ = *ch_src++;
return (dst);
}