tgrekov-libft
HIVE libft Oct 2023
Loading...
Searching...
No Matches
ft_memcpy.c
Go to the documentation of this file.
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* ft_memcpy.c :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: tgrekov <tgrekov@student.hive.fi> +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2023/10/23 15:14:33 by tgrekov #+# #+# */
9/* Updated: 2023/11/06 13:37:15 by tgrekov ### ########.fr */
10/* */
11/* ************************************************************************** */
12
20#include "libft.h"
21
36void *ft_memcpy(void *dst, const void *src, size_t n)
37{
38 if (src != dst)
39 {
40 while (n--)
41 ((unsigned char *) dst)[n] = ((const unsigned char *) src)[n];
42 }
43 return (dst);
44}
void * ft_memcpy(void *dst, const void *src, size_t n)
Copies n bytes from byte string src to byte string dst.
Definition ft_memcpy.c:36