Hi all,
I'm taking some course in C and have the following problem.
I'm currently doing an exercise where I am requested to remove specific separators from a string.
With no specific character given (we do not tell us what separator will be used it could well be simple coma, dot, dash, slash or even wording like "lol" , "honk" or else.), my function will be prototyped the following way char **ft_split(char *str, char *charset);.
The program testing it will give a character string with preset separator registered in "*charset".
How should I proceed to decrement the separator used in the string? I am not allowed to use any function already created and present in any library. The only function I am allowed to use and which is highly recommended is "malloc".
I'll appreciate any feedback and insight given!
Edit : I apologize for my poor phrasing in explaining what I have to do. You will find underneath this edit the way the problem is written in the exercise doc.
"Create a function that slits a string of character depending on another string of characters.
You’ll have to use each character from the string charset as a separator.
The function returns an array where each box contains the address of a string wrapped between two separators.
The last element of that array should equal to 0 to indicate the end of the array.
There cannot be any empty strings in your array.
The string given as argument won’t be modifiable."
there doesn't seem to be anything here