Fairly simple actually. Firstly you iterate through all chars in the source string and count the occurrences of the separator char. Then you allocate a new string array (num_separator_chars + 1). Finally you iterate a second time through all characters of the string and append them to the new string array.
Another way would be to use a dynamic array/list, but I am not quite sure which method is the faster one.