aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-02-27 18:07:57 +0100
committerCharles <sircharlesaze@gmail.com>2020-02-28 12:24:57 +0100
commit915f1b888cf9c05e4b61321f84ac045eacd8ddd1 (patch)
tree96c1a6b4833073e8035835feb9c5a6c0d163acc1 /src/util
parent8131a5d26441c5152ab151b4bb49b561e5ca6e81 (diff)
downloadlibft-915f1b888cf9c05e4b61321f84ac045eacd8ddd1.tar.gz
libft-915f1b888cf9c05e4b61321f84ac045eacd8ddd1.tar.bz2
libft-915f1b888cf9c05e4b61321f84ac045eacd8ddd1.zip
Added ft_lstlfind,ft_lstlsearch and ft_split_destroy
Diffstat (limited to 'src/util')
-rw-r--r--src/util/ft_split_destroy.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/util/ft_split_destroy.c b/src/util/ft_split_destroy.c
new file mode 100644
index 0000000..bc3f4e6
--- /dev/null
+++ b/src/util/ft_split_destroy.c
@@ -0,0 +1,24 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* ft_split_destroy.c :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2020/02/27 16:30:55 by cacharle #+# #+# */
+/* Updated: 2020/02/27 17:52:31 by cacharle ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+#include "libft_util.h"
+
+void *ft_split_destroy(char **strs)
+{
+ int i;
+
+ i = -1;
+ while (strs[++i] != NULL)
+ free(strs[i]);
+ free(strs);
+ return (NULL);
+}