-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_strnew.c
More file actions
26 lines (23 loc) · 1.08 KB
/
ft_strnew.c
File metadata and controls
26 lines (23 loc) · 1.08 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strnew.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: atimoshe <atimoshe@student.42.us.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/03/05 15:12:20 by atimoshe #+# #+# */
/* Updated: 2020/03/09 20:24:52 by atimoshe ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
char *ft_strnew(size_t size)
{
char *c;
c = (char *)malloc(sizeof(char) * size + 1);
if (c != NULL)
{
ft_bzero(c, size + 1);
return (c);
}
return (NULL);
}