norm: splitted functions in main into appropriate file
Moved lstdelenvelem & env2lst to ms_env.c Normed out files
This commit is contained in:
22
libft/srcs/ft_strdup.c
Normal file
22
libft/srcs/ft_strdup.c
Normal file
@@ -0,0 +1,22 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_strdup.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: tmaze <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2018/04/03 16:33:35 by tmaze #+# #+# */
|
||||
/* Updated: 2018/04/09 09:52:08 by tmaze ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "libft.h"
|
||||
|
||||
char *ft_strdup(const char *s1)
|
||||
{
|
||||
char *ret;
|
||||
|
||||
if ((ret = ft_strnew(ft_strlen(s1))) != NULL)
|
||||
ft_strcpy(ret, s1);
|
||||
return (ret);
|
||||
}
|
Reference in New Issue
Block a user