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? -

html - Unable to style the color of bullets in a list -

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