-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_strcat.c
30 lines (27 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
28
29
30
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strcat.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ashongwe <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/05/23 14:04:29 by ashongwe #+# #+# */
/* Updated: 2019/06/14 07:35:05 by ashongwe ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
char *ft_strcat(char *str1, const char *str2)
{
size_t length;
size_t control;
length = ft_strlen(str1);
control = 0;
while (str2[control])
{
str1[length] = str2[control];
length++;
control++;
}
str1[length] = '\0';
return (str1);
}