isUpper() public static method

public static isUpper ( string self ) : bool
self string
return bool
Example #1
0
        public static Locale fromStr(string s, bool check)
        {
            int len = s.Length;

            try
            {
                if (len == 2)
                {
                    if (FanStr.isLower(s))
                    {
                        return(new Locale(s, s, null));
                    }
                }

                if (len == 5)
                {
                    string lang    = s.Substring(0, 2);
                    string country = s.Substring(3, 2);
                    if (FanStr.isLower(lang) && FanStr.isUpper(country) && s[2] == '-')
                    {
                        return(new Locale(s, lang, country));
                    }
                }
            }
            catch (Exception e)
            {
                Err.dumpStack(e);
            }
            if (!check)
            {
                return(null);
            }
            throw ParseErr.make("Locale", s).val;
        }