-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_strcat.c
28 lines (25 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strcat.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rgaia <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/09/19 15:05:26 by rgaia #+# #+# */
/* Updated: 2017/09/29 21:40:16 by rgaia ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
char *ft_strcat(char *s1, const char *s2)
{
char *str1;
const char *str2;
str1 = s1;
str2 = s2;
while (*str1)
str1++;
while (*str2)
*str1++ = (char)*str2++;
*str1 = '\0';
return (s1);
}