aboutsummaryrefslogtreecommitdiff
path: root/src/str/ft_splitf.c
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-06-09 17:57:10 +0200
committerCharles <sircharlesaze@gmail.com>2020-06-09 17:57:10 +0200
commit6fe30c97aad7a4a3564e7037d64a43edcb9a2162 (patch)
tree5d36f19eb619811c93b852c5f5e04eb6fe12e85c /src/str/ft_splitf.c
parentf1babc364b2507cb8999d3132941b056feac37cd (diff)
downloadlibft-6fe30c97aad7a4a3564e7037d64a43edcb9a2162.tar.gz
libft-6fe30c97aad7a4a3564e7037d64a43edcb9a2162.tar.bz2
libft-6fe30c97aad7a4a3564e7037d64a43edcb9a2162.zip
Added ft_dstrwrap, ft_splitf, fixing bug in ft_split
Diffstat (limited to 'src/str/ft_splitf.c')
-rw-r--r--src/str/ft_splitf.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/str/ft_splitf.c b/src/str/ft_splitf.c
new file mode 100644
index 0000000..2a1afab
--- /dev/null
+++ b/src/str/ft_splitf.c
@@ -0,0 +1,22 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* ft_splitf.c :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2020/06/09 17:45:52 by charles #+# #+# */
+/* Updated: 2020/06/09 17:47:17 by charles ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+#include "libft_str.h"
+
+char **ft_splitf(char *s, char delim)
+{
+ char **ret;
+
+ ret = ft_split(s, delim);
+ free(s);
+ return (ret);
+}