ft_strcpy

This commit is contained in:
Tanguy MAZE 2018-04-04 16:52:06 +02:00
parent 4930df1c01
commit 4218930008
2 changed files with 26 additions and 1 deletions

View File

@ -6,7 +6,7 @@
# By: tmaze <marvin@42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# 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 \

24
ft_strcpy.c Normal file
View File

@ -0,0 +1,24 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strcpy.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tmaze <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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);
}