-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_strcat.c
29 lines (26 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strcat.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: malexand <malexand@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/06/26 17:41:08 by root #+# #+# */
/* Updated: 2017/02/16 17:33:48 by malexand ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
char *ft_strcat(char *dest, const char *src)
{
size_t len;
int i;
len = ft_strlen(dest);
i = 0;
while (src[i] != '\0')
{
dest[len + i] = src[i];
i++;
}
dest[len + i] = '\0';
return (dest);
}