Array a partir de uma string separada por vírgulas

Escreva uma função que transforme uma string separada por vírgulas em um array de strings, mantendo a ordem. Os itens são separados por uma vírgula seguida de um espaço. Retorne um array vazio quando a string de entrada estiver vazia.

Exemplos

Program.toArray("watermelon, raspberry, orange"); // new String[] { "watermelon", "raspberry", "orange" }
Program.toArray("x1, x2, x3, x4, x5"); // new String[] { "x1", "x2", "x3", "x4", "x5" }
Program.toArray("a, b, c, d"); // new String[] { "a", "b", "c", "d" }
Program.toArray(""); // new String[0]