Пример #1
0
 /// <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);
 }