-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_strcat.c
31 lines (29 loc) · 1.09 KB
/
ft_strcat.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strcat.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: nkuzminy <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/07/25 16:13:57 by nkuzminy #+# #+# */
/* Updated: 2022/07/30 14:49:10 by nkuzminy ### ########.fr */
/* */
/* ************************************************************************** */
char *ft_strcat(char *dest, char *src)
{
int i;
int d_size;
i = 0;
d_size = 0;
while (dest[d_size])
{
d_size++;
}
while (src[i])
{
dest[d_size + i] = src[i];
i++;
}
dest[d_size + i] = '\0';
return (dest);
}