-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_strcat.c
executable file
·27 lines (24 loc) · 1.13 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strcat.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jraymond <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/11/11 23:41:13 by jraymond #+# #+# */
/* Updated: 2017/11/16 16:27:11 by jraymond ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
char *ft_strcat(char *dest, const char *src)
{
char *bis_dest;
int i;
int size;
size = ft_strlen(src);
bis_dest = dest;
i = ft_strlen(dest);
ft_memcpy((bis_dest + i), src, ft_strlen(src));
bis_dest[i + size] = '\0';
return (dest);
}