當前位置: 首頁>>代碼示例>>C#>>正文


C# Char.IsNonPrintable方法代碼示例

本文整理匯總了C#中System.Char.IsNonPrintable方法的典型用法代碼示例。如果您正苦於以下問題:C# Char.IsNonPrintable方法的具體用法?C# Char.IsNonPrintable怎麽用?C# Char.IsNonPrintable使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在System.Char的用法示例。


在下文中一共展示了Char.IsNonPrintable方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: UrlUQ

        /// <summary>
        /// 4.4.21. URL-unquoted state
        /// </summary>
        CssToken UrlUQ(Char current, CssTokenType type)
        {
            while (true)
            {
                if (current.IsSpaceCharacter())
                {
                    return UrlEnd(type);
                }
                else if (current == Symbols.RoundBracketClose || current == Symbols.EndOfFile)
                {
                    return NewUrl(type, FlushBuffer());
                }
                else if (current == Symbols.DoubleQuote || current == Symbols.SingleQuote || current == Symbols.RoundBracketOpen || current.IsNonPrintable())
                {
                    RaiseErrorOccurred(CssParseError.InvalidCharacter);
                    return UrlBad(type);
                }
                else if (current != Symbols.ReverseSolidus)
                {
                    _stringBuffer.Append(current);
                }
                else if (IsValidEscape(current))
                {
                    current = GetNext();
                    _stringBuffer.Append(ConsumeEscape(current));
                }
                else
                {
                    RaiseErrorOccurred(CssParseError.InvalidCharacter);
                    return UrlBad(type);
                }

                current = GetNext();
            }
        }
開發者ID:JBTech,項目名稱:AngleSharp,代碼行數:38,代碼來源:CssTokenizer.cs

示例2: UrlUQ

        /// <summary>
        /// 4.4.21. URL-unquoted state
        /// </summary>
        CssToken UrlUQ(Char current, CssTokenType type)
        {
            while (true)
            {
                if (current.IsSpaceCharacter())
                {
                    return UrlEnd(Next, type);
                }
                else if (current == Specification.RoundBracketClose || current == Specification.EndOfFile)
                {
                    return CssStringToken.Url(type, FlushBuffer());
                }
                else if (current == Specification.DoubleQuote || current == Specification.SingleQuote || current == Specification.RoundBracketOpen || current.IsNonPrintable())
                {
                    RaiseErrorOccurred(ErrorCode.InvalidCharacter);
                    return UrlBad(Next, type);
                }
                else if (current == Specification.ReverseSolidus)
                {
                    if (IsValidEscape(current))
                    {
                        current = Next;
                        _stringBuffer.Append(ConsumeEscape(current));
                    }
                    else
                    {
                        RaiseErrorOccurred(ErrorCode.InvalidCharacter);
                        return UrlBad(Next, type);
                    }
                }
                else
                    _stringBuffer.Append(current);

                current = Next;
            }
        }
開發者ID:jogibear9988,項目名稱:AngleSharp,代碼行數:39,代碼來源:CssTokenizer.cs

示例3: UrlUQ

        /// <summary>
        /// 4.4.21. URL-unquoted state
        /// </summary>
        CssToken UrlUQ(Char current, CssTokenType type)
        {
            while (true)
            {
                if (current.IsSpaceCharacter())
                {
                    return UrlEnd(_src.Next, type);
                }
                else if (current == Specification.RBC || current == Specification.EOF)
                {
                    return CssStringToken.Url(type, FlushBuffer());
                }
                else if (current == Specification.DQ || current == Specification.SQ || current == Specification.RBO || current.IsNonPrintable())
                {
                    RaiseErrorOccurred(ErrorCode.InvalidCharacter);
                    return UrlBad(_src.Next, type);
                }
                else if (current == Specification.RSOLIDUS)
                {
                    if (IsValidEscape(current))
                    {
                        current = _src.Next;
                        _stringBuffer.Append(ConsumeEscape(current));
                    }
                    else
                    {
                        RaiseErrorOccurred(ErrorCode.InvalidCharacter);
                        return UrlBad(_src.Next, type);
                    }
                }
                else
                    _stringBuffer.Append(current);

                current = _src.Next;
            }
        }
開發者ID:rrsc,項目名稱:AngleSharp,代碼行數:39,代碼來源:CssTokenizer.cs


注:本文中的System.Char.IsNonPrintable方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。