-
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.13 KB
/
ft_memcpy.c
File metadata and controls
27 lines (24 loc) · 1.13 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: ikotvits <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/03/21 15:06:49 by ikotvits #+# #+# */
/* Updated: 2018/03/21 15:06:50 by ikotvits ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void *ft_memcpy(void *dst, const void *src, size_t n)
{
unsigned char *source;
size_t i;
unsigned char *dest;
i = -1;
dest = (unsigned char *)dst;
source = (unsigned char *)src;
while (++i < n)
dest[i] = source[i];
return (dst);
}