diff --git a/Makefile b/Makefile index 35569a4..d48c30e 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ # By: tmaze +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2018/04/04 10:51:59 by tmaze #+# #+# # -# Updated: 2018/04/04 15:30:28 by tmaze ### ########.fr # +# Updated: 2018/04/04 16:29:17 by tmaze ### ########.fr # # # #******************************************************************************# @@ -19,6 +19,7 @@ NAME = libft.a SRCS = \ ft_strlen.c \ ft_strdup.c \ + ft_strcpy.c \ ft_isalpha.c \ ft_isdigit.c \ ft_isalnum.c \ diff --git a/ft_strcpy.c b/ft_strcpy.c new file mode 100644 index 0000000..1e022cc --- /dev/null +++ b/ft_strcpy.c @@ -0,0 +1,24 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strcpy.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: tmaze +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2018/04/04 16:15:42 by tmaze #+# #+# */ +/* Updated: 2018/04/04 16:39:29 by tmaze ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" + +char *ft_strcpy(char *dest, const char *src) +{ + int i; + + i = -1; + while (++i == 0 || src[i - 1]) + dest[i] = src[i]; + return (dest); +} +