Added option to specify a custom separator.