Splits the string into an array, using the separator.