maxishell
Implementation of a shell for Linux-like systems
Loading...
Searching...
No Matches
ft_strjoin_free.c
Go to the documentation of this file.
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* ft_strjoin_free.c :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: rocky <marvin@42.fr> +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2024/09/06 23:07:53 by rocky #+# #+# */
9/* Updated: 2024/09/06 23:07:55 by rocky ### ########.fr */
10/* */
11/* ************************************************************************** */
12
13#include "libft.h"
14
15char *ft_strjoin_free(char *s1, char *s2)
16{
17 char *result;
18
19 if (!s1 || !s2)
20 return (NULL);
21 result = ft_strjoin(s1, s2);
22 free(s1);
23 return (result);
24}
char * ft_strjoin_free(char *s1, char *s2)
char * ft_strjoin(char const *s1, char const *s2)
Definition ft_strjoin.c:23