-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_strcpy.c
30 lines (27 loc) · 1.09 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strcpy.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: nhennigh <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/02/11 15:06:43 by nhennigh #+# #+# */
/* Updated: 2019/02/13 21:23:08 by nhennigh ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
char *ft_strcpy(char *dst, const char *src)
{
char *str_d;
char *str_s;
str_d = dst;
str_s = (char *)src;
while (*str_s)
{
*str_d = *str_s;
str_d++;
str_s++;
}
*str_d = '\0';
return (dst);
}