fillit/libft/ft_strcpy.c

25 lines
1 KiB
C
Raw Permalink Normal View History

2016-12-26 18:48:33 +02:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strcpy.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: gtertysh <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/11/30 13:03:43 by gtertysh #+# #+# */
/* Updated: 2016/11/30 13:09:52 by gtertysh ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
char *ft_strcpy(char *dst, const char *src)
{
size_t i;
i = 0;
while (*src)
*(dst + i++) = *src++;
*(dst + i) = '\0';
return (dst);
}