-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathft_strcat.c
30 lines (27 loc) · 1.07 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: tbenoist <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2015/11/24 17:03:56 by tbenoist #+# #+# */
/* Updated: 2015/12/02 14:14:06 by tbenoist ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
char *ft_strcat(char *s1, const char *s2)
{
char *tmp;
tmp = s1;
while (*s1 != '\0')
s1++;
while (*s2 != '\0')
{
*s1 = *s2;
s1++;
s2++;
}
*s1 = '\0';
return (tmp);
}