diff options
Diffstat (limited to 'lib/libft/ft_strcpy.c')
| -rw-r--r-- | lib/libft/ft_strcpy.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/libft/ft_strcpy.c b/lib/libft/ft_strcpy.c new file mode 100644 index 0000000..94a07f7 --- /dev/null +++ b/lib/libft/ft_strcpy.c @@ -0,0 +1,25 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strcpy.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: chuhlig <chuhlig@student.42.fr> +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2025/01/09 14:38:30 by chuhlig #+# #+# */ +/* Updated: 2025/01/14 14:10:06 by chuhlig ### ########.fr */ +/* */ +/* ************************************************************************** */ + +char *ft_strcpy(char *dest, char *src) +{ + int i; + + i = 0; + while (src[i] != '\0') + { + dest[i] = src[i]; + i++; + } + dest[i] = '\0'; + return (dest); +} |
