tgrekov-libft
HIVE libft Oct 2023
Loading...
Searching...
No Matches
ft_memcpy.c File Reference

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_memcpy.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tgrekov <tgrekov@student.hive.fi> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/10/23 15:14:33 by tgrekov #+# #+# */
/* Updated: 2023/11/06 13:37:15 by tgrekov ### ########.fr */
/* */
/* ************************************************************************** */

Definition in file ft_memcpy.c.

#include "libft.h"
Include dependency graph for ft_memcpy.c:

Go to the source code of this file.

Functions

void * ft_memcpy (void *dst, const void *src, size_t n)
 Copies n bytes from byte string src to byte string dst.
 

Function Documentation

◆ ft_memcpy()

void * ft_memcpy ( void *  dst,
const void *  src,
size_t  n 
)

Copies n bytes from byte string src to byte string dst.

Copy is always performed from end to start.
If your dst starts at any point after your src, even if they overlap, this function is safe.
If your dst starts prior to your src and overlaps it, or there is a possibility of this happening, use ft_memmove.

Parameters
[in]dstPointer to destination byte string
[in]srcPointer to source byte string
[in]nNumber of bytes to copy
Return values
void*dst

Definition at line 36 of file ft_memcpy.c.

Here is the caller graph for this function: