-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_strcpy.c
More file actions
28 lines (25 loc) · 1.08 KB
/
ft_strcpy.c
File metadata and controls
28 lines (25 loc) · 1.08 KB
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_strcpy.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ymehdi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/04/06 17:04:42 by ymehdi #+# #+# */
/* Updated: 2019/04/06 17:11:29 by ymehdi ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
char *ft_strcpy(char *dst, const char *src)
{
int pos;
pos = 0;
while (src[pos] != '\0')
{
dst[pos] = src[pos];
pos++;
}
if (src[pos] == '\0')
dst[pos] = '\0';
return (dst);
}