Advertisement
Guest User

Untitled

a guest
Jan 24th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.43 KB | None | 0 0
  1.     public static class StringExtension
  2.     {
  3.         public static bool IsCyrillic(this string str)
  4.         {
  5.             string sumdols = "абвгдеёжзийклмнопрстуфхцчшщъыьэюя";
  6.  
  7.             for (int i = 0; i < str.Length; i++)
  8.             {
  9.                 if (sumdols.IndexOf(char.ToLower(str[i])) == -1)
  10.                     return false;
  11.             }
  12.  
  13.             return true;
  14.         }
  15.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement