42_C_PISCINE/C/c03v1/ex02/ft_strcat.c
Camille Chauvet 29ed24d567 init
2023-05-17 16:45:25 +00:00

30 lines
1.1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strcat.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/07/18 13:43:42 by cchauvet #+# #+# */
/* Updated: 2022/07/21 12:59:50 by cchauvet ### ########.fr */
/* */
/* ************************************************************************** */
char *ft_strcat(char *dest, char *src)
{
int i;
int j;
i = 0;
while (dest[i] != 0)
i++;
j = 0;
while (src[j] != 0)
{
dest[i + j] = src[j];
j++;
}
dest[i + j] = 0;
return (dest);
}