-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_strcpy.c
33 lines (29 loc) · 1.17 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
30
31
32
33
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strcpy.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: vinguyen <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/10/01 12:20:14 by vinguyen #+# #+# */
/* Updated: 2019/10/01 12:20:17 by vinguyen ### ########.fr */
/* */
/* ************************************************************************** */
/*
** Copies the string src to dst including \0
** Return: returns dst
** Notes: most people do not use this since src may be bigger than dst
*/
#include "libft.h"
char *ft_strcpy(char *dst, const char *src)
{
int i;
i = 0;
while (src[i])
{
dst[i] = src[i];
i++;
}
dst[i] = '\0';
return (dst);
}