System.Runtime.Serialization.Plists.Extensions.IsAscii C# (CSharp) Method

IsAscii() public static method

Gets a value indicating whether the given string is all ASCII.
public static IsAscii ( this value ) : bool
value this The string to check.
return bool
        public static bool IsAscii(this string value)
        {
            if (!string.IsNullOrEmpty(value))
            {
                foreach (char c in value)
                {
                    if (c > 127)
                    {
                        return false;
                    }
                }
            }

            return true;
        }