24 lines
1.0 KiB
C
24 lines
1.0 KiB
C
|
/* ************************************************************************** */
|
||
|
/* */
|
||
|
/* ::: :::::::: */
|
||
|
/* ft_strnew.c :+: :+: :+: */
|
||
|
/* +:+ +:+ +:+ */
|
||
|
/* By: gbrochar <marvin@42.fr> +#+ +:+ +#+ */
|
||
|
/* +#+#+#+#+#+ +#+ */
|
||
|
/* Created: 2015/11/28 18:26:56 by gbrochar #+# #+# */
|
||
|
/* Updated: 2016/02/29 22:06:10 by gbrochar ### ########.fr */
|
||
|
/* */
|
||
|
/* ************************************************************************** */
|
||
|
|
||
|
#include "libft.h"
|
||
|
|
||
|
char *ft_strnew(size_t size)
|
||
|
{
|
||
|
char *str;
|
||
|
|
||
|
str = (char *)malloc(size * sizeof(char) + 1);
|
||
|
if (!str)
|
||
|
return (NULL);
|
||
|
return (str);
|
||
|
}
|