diff options
| author | Cabergs Charles <cacharle@e-r6-p7.s19.be> | 2019-07-16 12:58:13 +0200 |
|---|---|---|
| committer | Cabergs Charles <cacharle@e-r6-p7.s19.be> | 2019-07-16 12:58:13 +0200 |
| commit | 66635d69fa00e335a091d7e6f2b358cbaaf205e4 (patch) | |
| tree | 3ecf5a41b4541980ba0287a431681cd5ae25ad84 /c09/main.c | |
| parent | 11114fd684250943de56c4f73ab45c97f2aaf83a (diff) | |
| download | piscine-66635d69fa00e335a091d7e6f2b358cbaaf205e4.tar.gz piscine-66635d69fa00e335a091d7e6f2b358cbaaf205e4.tar.bz2 piscine-66635d69fa00e335a091d7e6f2b358cbaaf205e4.zip | |
c09 passed, c10 start, exam00 and exam01
Diffstat (limited to 'c09/main.c')
| -rw-r--r-- | c09/main.c | 27 |
1 files changed, 27 insertions, 0 deletions
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 <stdio.h> +#include <stdlib.h> +#include <string.h> +#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; +} |
