15 lines
479 B
Plaintext
15 lines
479 B
Plaintext
Assignment name : ft_split
|
|
Expected files : ft_split.c
|
|
Allowed functions: malloc
|
|
--------------------------------------------------------------------------------
|
|
|
|
Write a function that takes a string, splits it into words, and returns them as
|
|
a NULL-terminated array of strings.
|
|
|
|
A "word" is defined as a part of a string delimited either by spaces/tabs/new
|
|
lines, or by the start/end of the string.
|
|
|
|
Your function must be declared as follows:
|
|
|
|
char **ft_split(char *str);
|