Skip to content

Instantly share code, notes, and snippets.

@smakhtin
Last active December 25, 2015 02:19
Show Gist options
  • Select an option

  • Save smakhtin/6901668 to your computer and use it in GitHub Desktop.

Select an option

Save smakhtin/6901668 to your computer and use it in GitHub Desktop.
Fast string cleaning in C# via LINQ
public static string UseWhere(string dirtyString)
{
return new String(dirtyString.Where(Char.IsLetterOrDigit).ToArray());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment