-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_strcat.c
26 lines (23 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strcat.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: esupatae <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/09/18 23:46:26 by esupatae #+# #+# */
/* Updated: 2019/09/18 23:46:29 by esupatae ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
char *ft_strcat(char *dest, const char *src)
{
char *ans;
size_t i;
i = ft_strlen(dest);
ans = dest + i;
while (*src)
*ans++ = *(char*)src++;
*ans = '\0';
return (dest);
}