-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_strcat.c
30 lines (28 loc) · 1.08 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strcat.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ctreton <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2013/11/20 22:34:12 by ctreton #+# #+# */
/* Updated: 2013/12/29 01:08:26 by ctreton ### ########.fr */
/* */
/* ************************************************************************** */
char *ft_strcat(char *dest, const char *src)
{
int i;
int j;
i = 0;
j = 0;
while (dest[i] != '\0')
i++;
while (src[j] != '\0')
{
dest[i] = src[j];
i++;
j++;
}
dest[i] = '\0';
return (dest);
}