-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_strcpy.c
29 lines (27 loc) · 1.05 KB
/
ft_strcpy.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strcpy.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ybouzgao <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/11/07 14:07:06 by ybouzgao #+# #+# */
/* Updated: 2017/11/09 17:31:21 by ybouzgao ### ########.fr */
/* */
/* ************************************************************************** */
char *ft_strcpy(char *dst, const char *src)
{
int i;
int j;
j = 0;
i = 0;
while (src[i])
i++;
while (j < i)
{
dst[j] = src[j];
j++;
}
dst[j] = '\0';
return (dst);
}