The array will end with a NULL pointer, so your code can detect its last element. split
Fantastic news! We've Found the answer you've been seeking!
Question:
The array will end with a NULL pointer, so your code can detect its last element. split will ignore (discard) blank spaces and tabs before and between words. It will also remove colons from the end of a word, which is convenient because a target will end with a colon. For example, if called on a line parrots: eat carrots, a dynamically-allocated array with four elements will be returned, which are in order) the strings parrots, eat, carrots, and NULL (the three non-NULL strings, and the array itself, are all dynamically allocated).
Posted Date: