-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_strcat.c
More file actions
30 lines (27 loc) · 1.13 KB
/
ft_strcat.c
File metadata and controls
30 lines (27 loc) · 1.13 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
27
28
29
30
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strcat.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mmoufakk <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/09/13 18:40:21 by mmoufakk #+# #+# */
/* Updated: 2018/10/17 20:11:39 by mmoufakk ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
char *ft_strcat(char *dest, const char *src)
{
int i;
int dest_length;
i = 0;
dest_length = ft_strlen(dest);
while (src[i] != '\0')
{
dest[dest_length] = src[i];
i++;
dest_length++;
}
dest[dest_length] = '\0';
return (dest);
}