Generalise the CSV function to a character-separated values function so that other separators can be specified