diff options
| author | Dominik Kaiser | 2025-01-20 20:14:32 +0100 |
|---|---|---|
| committer | GitHub | 2025-01-20 20:14:32 +0100 |
| commit | bd8c817797d5f2b1affe6957ffc51846a38e70ec (patch) | |
| tree | 2fc0f567b1c4f2f168a931ad0bff69e52c6c226c /lib/libft/ft_strcat.c | |
| parent | a9aba07b52cbf98eb9c52cd8ee0cd5f5021d2931 (diff) | |
| parent | dc6a4f2d0de92984c2584ef905011e2a60792850 (diff) | |
| download | minishell-bd8c817797d5f2b1affe6957ffc51846a38e70ec.tar.gz minishell-bd8c817797d5f2b1affe6957ffc51846a38e70ec.zip | |
Merge interpreter changes into main
Miau
Diffstat (limited to 'lib/libft/ft_strcat.c')
| -rw-r--r-- | lib/libft/ft_strcat.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/libft/ft_strcat.c b/lib/libft/ft_strcat.c new file mode 100644 index 0000000..b21235b --- /dev/null +++ b/lib/libft/ft_strcat.c @@ -0,0 +1,29 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strcat.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: chuhlig <chuhlig@student.42.fr> +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2025/01/09 13:06:44 by chuhlig #+# #+# */ +/* Updated: 2025/01/14 14:09:49 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); +} |
