c# - How to check if Strings all characters in a specific unicode range? -


this question has answer here:

hi example have string in sinhala unicode

 string variable = "සහ"; - correct string  string variable = "xසහs"; - incorrect string 

i want validate if all characters string in specific unicode range belongs specific language.

any idea of achiving ?

static bool validate(string s, char max, char min) {     (int = 0; < s.length; i++)         if (s[i] > max || s[i] < min)             return false;     return true; } 

Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -