本文整理汇总了C#中System.Text.StringBuilder.AppendRange方法的典型用法代码示例。如果您正苦于以下问题:C# System.Text.StringBuilder.AppendRange方法的具体用法?C# System.Text.StringBuilder.AppendRange怎么用?C# System.Text.StringBuilder.AppendRange使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Text.StringBuilder
的用法示例。
在下文中一共展示了System.Text.StringBuilder.AppendRange方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: _parseQuotedTail
/// <summary>
/// Method called to parse tail of pointer path, when a potentially
/// escaped character has been seen.
/// </summary>
/// <param name="input">Full input for the tail being parsed</param>
/// <param name="i">Offset to character after tilde</param>
protected internal static com.fasterxml.jackson.core.JsonPointer _parseQuotedTail(string input, int i)
{
int end = input.Length;
System.Text.StringBuilder sb = new System.Text.StringBuilder(System.Math.max(16,
end));
if (i > 2)
{
sb.AppendRange(input, 1, i - 1);
}
_appendEscape(sb, input[i++]);
while (i < end)
{
char c = input[i];
if (c == '/')
{
// end is nigh!
return new com.fasterxml.jackson.core.JsonPointer(input, sb.ToString(), _parseTail
(Sharpen.Runtime.substring(input, i)));
}
++i;
if (c == '~' && i < end)
{
_appendEscape(sb, input[i++]);
continue;
}
sb.Append(c);
}
// end of the road, last segment
return new com.fasterxml.jackson.core.JsonPointer(input, sb.ToString(), EMPTY);
}