blob: 5b29b5ba15396c595a46da241fb46c3f1edac24b (
plain)
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
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_dstrunwrap.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/04/03 13:59:35 by charles #+# #+# */
/* Updated: 2020/04/04 19:58:41 by charles ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft_dstr.h"
/*
** \brief Destroy dynamic string but keep the underlying static string
** \param dstr Dynamic string to unwrap
** \return Underlying string of the dynamic one
*/
char *ft_dstrunwrap(t_ftdstr *dstr)
{
char *tmp;
tmp = dstr->str;
free(dstr);
return (tmp);
}
|