29 lines
1.1 KiB
C
29 lines
1.1 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_strcpy.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: hulamy <marvin@42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2018/11/14 21:16:17 by hulamy #+# #+# */
|
|
/* Updated: 2019/03/25 15:19:19 by hulamy ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
/*
|
|
** copy string src to dst including '\0' and return dst
|
|
*/
|
|
|
|
#include "libft.h"
|
|
|
|
char *ft_strcpy(char *dest, const char *src)
|
|
{
|
|
int i;
|
|
|
|
i = -1;
|
|
while (src[++i])
|
|
dest[i] = src[i];
|
|
dest[i] = '\0';
|
|
return (dest);
|
|
}
|