add tests and implementation for arbitrary separator character