- The documentation on the header allow u to see on the files where the header is inclued
27 lines
1.1 KiB
C
27 lines
1.1 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_strncpy.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2024/10/31 16:14:10 by rparodi #+# #+# */
|
|
/* Updated: 2025/09/05 16:17:50 by rparodi ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include <stddef.h>
|
|
|
|
char *ft_strcpy(char *dst, const char *src, size_t size)
|
|
{
|
|
size_t i;
|
|
|
|
i = 0;
|
|
while (src[i] || i < size)
|
|
{
|
|
dst[i] = src[i];
|
|
i++;
|
|
}
|
|
dst[i] = '\0';
|
|
return (dst);
|
|
}
|