Skip to content

Instantly share code, notes, and snippets.

@nchapman
Created March 24, 2010 23:19
Show Gist options
  • Save nchapman/342942 to your computer and use it in GitHub Desktop.
Save nchapman/342942 to your computer and use it in GitHub Desktop.
// To get delimited values as an array
if (!string.IsNullOrEmpty(input))
items = input.Split(new[] { ",", " ", ";" }, StringSplitOptions.RemoveEmptyEntries);
// To put them back together with a standard delimiter
var output = string.Join(", ", items);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment