-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_strcat.c
32 lines (29 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
31
32
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strcat.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: puttsche <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/11/12 23:45:04 by puttsche #+# #+# */
/* Updated: 2016/11/13 00:33:55 by puttsche ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
char *ft_strcat(char *dest, const char *src)
{
int y;
int x;
y = 0;
x = 0;
while (dest[x])
x++;
while (src[y])
{
dest[x] = src[y];
x++;
y++;
}
dest[x] = '\0';
return (dest);
}