-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_strcat.c
More file actions
26 lines (23 loc) · 1.08 KB
/
ft_strcat.c
File metadata and controls
26 lines (23 loc) · 1.08 KB
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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strcat.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jagarcia <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/11/11 02:09:32 by jagarcia #+# #+# */
/* Updated: 2017/11/13 15:11:57 by jagarcia ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
char *ft_strcat(char *s1, const char *s2)
{
char unsigned *s1cpy;
s1cpy = (char unsigned *)s1;
while (*s1cpy)
s1cpy++;
while (*s2)
*s1cpy++ = *s2++;
*s1cpy = '\0';
return (s1);
}