本文整理匯總了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();
}
}
示例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;
}
}
示例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;
}
}