creation du main de testing et du test de abs
This commit is contained in:
28
testing/srcs/test_strcpy.c
Normal file
28
testing/srcs/test_strcpy.c
Normal file
@@ -0,0 +1,28 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* 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);
|
||||
}
|
||||
Reference in New Issue
Block a user