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