-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_strcat.c
28 lines (25 loc) · 1.08 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strcat.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ibohonos <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/10/24 23:24:36 by ibohonos #+# #+# */
/* Updated: 2017/10/24 23:24:38 by ibohonos ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
char *ft_strcat(char *dest, const char *src)
{
int i;
int l;
i = 0;
l = 0;
while (dest[l] != '\0')
l++;
while (src[i] != '\0')
dest[l++] = src[i++];
dest[l] = '\0';
return (dest);
}