aboutsummaryrefslogtreecommitdiff
path: root/lib/libft/ft_strcat.c
diff options
context:
space:
mode:
authorChristopher Uhlig2025-01-13 11:06:54 +0100
committerChristopher Uhlig2025-01-13 11:06:54 +0100
commit78dc50a2bce3c6e31405437189e2990d8fc720ac (patch)
treed61d9f0d279e191c1bfb34929908f412cf58c02d /lib/libft/ft_strcat.c
parentae5512ea0d6d8be833ca3a9b39f93239109f45b4 (diff)
downloadminishell-78dc50a2bce3c6e31405437189e2990d8fc720ac.tar.gz
minishell-78dc50a2bce3c6e31405437189e2990d8fc720ac.zip
here
Diffstat (limited to 'lib/libft/ft_strcat.c')
-rw-r--r--lib/libft/ft_strcat.c29
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..648c184
--- /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/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