-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_strnew.c
More file actions
23 lines (20 loc) · 1.04 KB
/
Copy pathft_strnew.c
File metadata and controls
23 lines (20 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strnew.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tbenedic <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/06/05 16:21:08 by tbenedic #+# #+# */
/* Updated: 2018/06/14 16:48:45 by tbenedic ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
char *ft_strnew(size_t size)
{
char *fresh;
if ((fresh = ft_memalloc(size + 1)) == NULL)
return (NULL);
ft_bzero(fresh, size + 1);
return (fresh);
}