-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_strcat.c
28 lines (25 loc) · 1.07 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: bwebb <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/05/23 10:46:40 by bwebb #+# #+# */
/* Updated: 2019/05/30 11:58:52 by bwebb ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
char *ft_strcat(char *d, const char *src)
{
int i;
int j;
const char *s;
i = ft_strlen(d);
s = src;
j = 0;
while (s[j] != '\0')
d[i++] = s[j++];
d[i] = '\0';
return (d);
}