-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_strnewmatrice.c
30 lines (27 loc) · 1.11 KB
/
ft_strnewmatrice.c
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
28
29
30
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strnewmatrice.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: twakrim <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/10/23 11:53:07 by twakrim #+# #+# */
/* Updated: 2018/10/23 14:54:50 by twakrim ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
char **ft_strnewmatrice(size_t size)
{
size_t i;
char **str;
i = 0;
str = (char**)malloc(sizeof(char*) * (size + 1));
if (str == NULL)
return (NULL);
while (i <= size)
{
str[i] = "\0";
i++;
}
return (str);
}