13 #include "../ft_mem/ft_mem.h"
26 while (*s !=
'\0' && *s == c)
42 if (p_p_ret[p_p_ret_index] != NULL)
45 while (current_index < p_p_ret_index)
46 free(p_p_ret[current_index++]);
55 const char *p_top_to_dup;
59 while (*s !=
'\0' && *s == c)
63 while (p_p_ret != NULL && *s !=
'\0')
66 while (*s !=
'\0' && *s != c)
68 p_p_ret[p_p_ret_index]
69 =
ft_substr(p_top_to_dup, 0, (
size_t)s - (
size_t)p_top_to_dup);
72 while (*s !=
'\0' && *s == c)
void * ft_calloc(size_t count, size_t size)
static int check_and_handle_alloc_error(char **p_p_ret, size_t p_p_ret_index)
char ** ft_split(char const *s, char c)
static size_t count_char(const char *s, char c)
char * ft_substr(char const *s, unsigned int start, size_t len)