From 78dc50a2bce3c6e31405437189e2990d8fc720ac Mon Sep 17 00:00:00 2001 From: Christopher Uhlig Date: Mon, 13 Jan 2025 11:06:54 +0100 Subject: here --- lib/libft/ft_strcat.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 lib/libft/ft_strcat.c (limited to 'lib/libft/ft_strcat.c') diff --git a/lib/libft/ft_strcat.c b/lib/libft/ft_strcat.c new file mode 100644 index 0000000..648c184 --- /dev/null +++ b/lib/libft/ft_strcat.c @@ -0,0 +1,29 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strcat.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: chuhlig +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2025/01/09 13:06:44 by chuhlig #+# #+# */ +/* Updated: 2025/01/09 13:07:15 by chuhlig ### ########.fr */ +/* */ +/* ************************************************************************** */ + +char *ft_strcat(char *dest, char *src) +{ + int i; + int j; + + j = 0; + i = 0; + while (dest[i]) + i++; + while (src[j]) + { + dest[i + j] = src[j]; + j++; + } + dest[i + j] = '\0'; + return (dest); +} \ No newline at end of file -- cgit v1.2.3