56static char *
strndup(
const char *s,
size_t n)
78 if (*s != c && !in_word)
83 else if (*s == c && in_word)
85 result[i++] =
strndup(start, s - start);
91 result[i++] =
strndup(start, s - start);
103 result = malloc(
sizeof(
char *) * (word_count + 1));
static void split_into_words(char **result, const char *s, char c)
static char * strndup(const char *s, size_t n)
char ** ft_split(const char *s, char c)
static int count_words(const char *s, char c)
void * ft_memcpy(void *dest, const void *src, size_t n)