42_C_PISCINE/Rush/Rush02/ex00/ft_strcat.c
Camille Chauvet 29ed24d567 init
2023-05-17 16:45:25 +00:00

32 lines
1.1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strcat.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/07/31 18:35:08 by cchauvet #+# #+# */
/* Updated: 2022/07/31 22:40:07 by cchauvet ### ########.fr */
/* */
/* ************************************************************************** */
#include "rush02.h"
char *cat(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);
}