libft
ft_strcpy.c
Go to the documentation of this file.
1 /* ************************************************************************** */
3 /* */
4 /* ::: :::::::: */
5 /* ft_strcpy.c :+: :+: :+: */
6 /* +:+ +:+ +:+ */
7 /* By: unite <marvin@42.fr> +#+ +:+ +#+ */
8 /* +#+#+#+#+#+ +#+ */
9 /* Created: 2019/09/04 22:56:52 by unite #+# #+# */
10 /* Updated: 2020/07/16 02:50:32 by unite ### ########.fr */
11 /* */
12 /* ************************************************************************** */
13 
14 #include "libft.h"
15 
20 char *ft_strcpy(char *dst, const char *src)
21 {
22  size_t i;
23 
24  i = 0;
25  while (src[i])
26  {
27  dst[i] = src[i];
28  i++;
29  }
30  dst[i] = 0;
31  return (dst);
32 }
libft.h
ft_strcpy
char * ft_strcpy(char *dst, const char *src)
Replicates behaviour of strcpy from libc.
Definition: ft_strcpy.c:20