-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_strcat.c
25 lines (22 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strcat.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: yochered <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/10/25 16:43:12 by yochered #+# #+# */
/* Updated: 2018/10/25 16:43:13 by yochered ### ########.fr */
/* */
/* ************************************************************************** */
#include <libft.h>
char *ft_strcat(char *s1, const char *s2)
{
char *s1_tmp;
s1_tmp = s1;
s1_tmp += ft_strlen(s1);
while (*s2)
*s1_tmp++ = *s2++;
*s1_tmp = '\0';
return (s1);
}