Created
January 8, 2018 16:02
-
-
Save SpeedOfSpin/5760559b34e1c8c1523d9ab5a178f29f to your computer and use it in GitHub Desktop.
Strip all characters except Alpha
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public string strip(string str) | |
{ | |
char[] arr = str.ToCharArray(); | |
arr = Array.FindAll<char>(arr, (c => (char.IsLetter(c)))); | |
str = new string(arr); | |
return str.ToLowerInvariant(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment