ft_strcpy
This commit is contained in:
parent
4930df1c01
commit
4218930008
3
Makefile
3
Makefile
@ -6,7 +6,7 @@
|
|||||||
# By: tmaze <marvin@42.fr> +#+ +:+ +#+ #
|
# By: tmaze <marvin@42.fr> +#+ +:+ +#+ #
|
||||||
# +#+#+#+#+#+ +#+ #
|
# +#+#+#+#+#+ +#+ #
|
||||||
# Created: 2018/04/04 10:51:59 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 = \
|
SRCS = \
|
||||||
ft_strlen.c \
|
ft_strlen.c \
|
||||||
ft_strdup.c \
|
ft_strdup.c \
|
||||||
|
ft_strcpy.c \
|
||||||
ft_isalpha.c \
|
ft_isalpha.c \
|
||||||
ft_isdigit.c \
|
ft_isdigit.c \
|
||||||
ft_isalnum.c \
|
ft_isalnum.c \
|
||||||
|
24
ft_strcpy.c
Normal file
24
ft_strcpy.c
Normal 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);
|
||||||
|
}
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user