-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_strcat.c
executable file
·30 lines (27 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: rtiutiun <rtiutiun@42.us.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/04/10 23:46:37 by rtiutiun #+# #+# */
/* Updated: 2017/09/21 23:48:49 by rtiutiun ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
char *ft_strcat(char *restrict s1, char *restrict s2)
{
size_t i;
size_t j;
i = ft_strlen(s1);
j = 0;
while (s2[j])
{
s1[i] = s2[j];
i++;
j++;
}
s1[i] = '\0';
return (s1);
}