Skip to content

Instantly share code, notes, and snippets.

@121jigowatts
Last active August 29, 2015 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 121jigowatts/4419b29fd80dc18b09ef to your computer and use it in GitHub Desktop.
Save 121jigowatts/4419b29fd80dc18b09ef to your computer and use it in GitHub Desktop.
String.Splitで文字列を分解する時にTrimする
public static string[] SplitComma(string s)
{
return s.Split(',')
.Select(s => s.Trim())
.Where(s => s != string.Empty)
.ToArray();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment