init
This commit is contained in:
29
C/c03v2/ex02/ft_strcat.c
Normal file
29
C/c03v2/ex02/ft_strcat.c
Normal file
@ -0,0 +1,29 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_strcat.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2022/07/18 13:43:42 by cchauvet #+# #+# */
|
||||
/* Updated: 2022/07/24 17:42:30 by cchauvet ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
char *ft_strcat(char *dest, char *src)
|
||||
{
|
||||
unsigned int i;
|
||||
unsigned 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);
|
||||
}
|
Reference in New Issue
Block a user