-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.c
33 lines (31 loc) · 1.12 KB
/
test.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
32
33
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strcat.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: alebda <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2015/09/09 04:19:49 by alebda #+# #+# */
/* Updated: 2015/09/09 04:53:33 by alebda ### ########.fr */
/* */
/* ************************************************************************** */
char *ft_strcat(char *dest, char *src)
{
int i;
int lenght;
i = 0;
lenght = 0;
while (dest[i] != '\0')
{
lenght++;
i++;
}
i = 0;
while (src[i] != '\0')
{
dest[lenght + i] = src[i];
i++;
}
dest[lenght + i] = '\0';
return (dest);
}