From 14914f50c3de6c5444e13cf67db064b03c1c90ef Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 16 Jul 2019 12:58:13 +0200 Subject: c09 passed, c10 start, exam00 and exam01 --- c09/main.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 c09/main.c (limited to 'c09/main.c') diff --git a/c09/main.c b/c09/main.c new file mode 100644 index 0000000..02c5a61 --- /dev/null +++ b/c09/main.c @@ -0,0 +1,27 @@ +#include +#include +#include +#include "ex02/ft_split.c" + +int main() +{ + char *const str = "3YaZkAP30iGoBWv L asdf h LbpX8Hx FWHwB2u1FH0S5"; + char *begin = "\n \t hgonjour"; + char *end = "jesuis\n\t hhh"; + char *empty = " h bonjour je suis "; + char *charset = "\n\t"; + char **strs = ft_split(end, charset); + printf("tab start\n"); + for (int i = 0; strs[i] != 0; i++) + { + printf("tab[%d]: %s\n", i, strs[i]); + /*for (int j = 0; j < 10; j++)*/ + /*printf("%d ", strs[i][j]);*/ + } + printf("tab end\n"); + for (int i = 0; strs[i] != 0; i++) + free(strs[i]); + free(strs); + + return 0; +} -- cgit