-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_strnew_bonus.c
23 lines (20 loc) · 1.08 KB
/
ft_strnew_bonus.c
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: aviholai <aviholai@student.hive.fi> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/01/17 16:34:46 by aviholai #+# #+# */
/* Updated: 2022/02/07 14:32:31 by aviholai ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/*
** 'Strnew()' (string new) allocates and returns a new string the size of
** the applied the parameter 'size' + 1.
*/
char *ft_strnew(size_t size)
{
return ((char *)ft_memalloc(size + 1));
}