-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_strcat.c
31 lines (28 loc) · 1.11 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
31
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strcat.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: dnichol <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/09/04 16:30:44 by dnichol #+# #+# */
/* Updated: 2019/09/05 11:45:16 by dnichol ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
char *ft_strcat(char *restrict dest, const char *restrict src)
{
size_t i;
size_t j;
i = 0;
j = 0;
i = ft_strlen(dest);
while (src[j] != '\0')
{
dest[i] = src[j];
j++;
i++;
}
dest[i] = '\0';
return (dest);
}