/* ************************************************************************** */
/*                                                          LE - /            */
/*                                                              /             */
/*   ft_nstr.c                                        .::    .:/ .      .::   */
/*                                                 +:+:+   +:    +:  +:+:+    */
/*   By: rbousset <marvin@le-101.fr>                +:+   +:    +:    +:+     */
/*                                                 #+#   #+    #+    #+#      */
/*   Created: 2019/12/07 04:23:30 by rbousset     #+#   ##    ##    #+#       */
/*   Updated: 2019/12/07 04:23:32 by rbousset    ###    #+. /#+    ###.fr     */
/*                                                         /                  */
/*                                                        /                   */
/* ************************************************************************** */

#include <stdlib.h>
#include <stddef.h>

char
	*ft_nstr(size_t size)
{
	char		*str;
	size_t		i;

	i = 0;
	size += 1;
	if (!(str = (char*)malloc((size) * sizeof(char))))
		return (NULL);
	while (i < size)
	{
		str[i] = '\0';
		i++;
	}
	return (str);
}