33 lines
1.1 KiB
C
33 lines
1.1 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_strcat.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: ajoly <marvin@42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2022/07/21 15:08:59 by ajoly #+# #+# */
|
|
/* Updated: 2022/07/21 15:11:10 by ajoly ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
char *ft_strcat(char *dest, char *src)
|
|
{
|
|
int i;
|
|
int l;
|
|
|
|
i = 0;
|
|
l = 0;
|
|
while (dest[i] != '\0')
|
|
{
|
|
i++;
|
|
}
|
|
while (src[l] != '\0')
|
|
{
|
|
dest[i] = src[l];
|
|
i++;
|
|
l++;
|
|
}
|
|
dest[i] = '\0';
|
|
return (dest);
|
|
}
|