IsValidCharacter() публичный статический Метод

public static IsValidCharacter ( char input ) : bool
input char
Результат bool
        static string EncodeRFC5987(string value)
        {
            var           encoding = Encoding.UTF8;
            StringBuilder sb       = new StringBuilder(value.Length + 11);

            sb.Append(encoding.WebName);
            sb.Append('\'');
            sb.Append('\'');

            for (int i = 0; i < value.Length; ++i)
            {
                var ch = value[i];
                if (ch > 127)
                {
                    foreach (var b in encoding.GetBytes(new[] { ch }))
                    {
                        sb.Append('%');
                        sb.Append(b.ToString("X2"));
                    }

                    continue;
                }

                if (!Lexer.IsValidCharacter(ch) || ch == '*' || ch == '?' || ch == '%')
                {
                    sb.Append(Uri.HexEscape(ch));
                    continue;
                }

                sb.Append(ch);
            }

            return(sb.ToString());
        }