| 123456789101112131415161718192021222324 |
- /* ************************************************************************** */
- /* */
- /* ::: :::::::: */
- /* ft_strnew.c :+: :+: :+: */
- /* +:+ +:+ +:+ */
- /* By: bchanot <bchanot@students.42.fr> +#+ +:+ +#+ */
- /* +#+#+#+#+#+ +#+ */
- /* Created: 2015/11/25 17:38:59 by bchanot #+# #+# */
- /* Updated: 2016/09/01 23:42:27 by bchanot ### ########.fr */
- /* */
- /* ************************************************************************** */
- #include "libft.h"
- #include <stdlib.h>
- char *ft_strnew(size_t size)
- {
- char *str;
- if (!(str = (char *)malloc(sizeof(char) * (size + 1))))
- return (NULL);
- ft_bzero(str, size);
- return (str);
- }
|