-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_strnew.c
More file actions
27 lines (24 loc) · 1.05 KB
/
ft_strnew.c
File metadata and controls
27 lines (24 loc) · 1.05 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
25
26
27
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strnew.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: akalmyko <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/09/29 16:10:07 by akalmyko #+# #+# */
/* Updated: 2016/09/29 16:10:10 by akalmyko ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
char *ft_strnew(size_t size)
{
char *str;
str = (char*)malloc(size + 1);
if (str)
{
ft_bzero(str, (size + 1));
return (str);
}
else
return (NULL);
}