42-archive/nmap/libft/srcs/str/ft_strcpy.c
2017-10-08 21:30:28 +02:00

27 lines
1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strcpy.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/08/07 10:48:12 by jhalford #+# #+# */
/* Updated: 2017/03/13 16:06:49 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
char *ft_strcpy(char *dst, const char *src)
{
int i;
i = 0;
while (src && src[i])
{
dst[i] = src[i];
i++;
}
dst[i] = '\0';
return (dst);
}