Advertisement
Guest User

Untitled

a guest
Nov 14th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. public static string[] RemoveFromArrayDistinct(string phrase)
  2. {
  3. char[] delimiterChars = { ' ', ',', '.', ':', ';', '!', '?', '\"', '\t', '\n' };
  4. string[] words = phrase.ToLower().Split(delimiterChars, StringSplitOptions.RemoveEmptyEntries);
  5. Array.Sort(words);
  6. return words.Distinct().ToArray();
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement