Ejemplo n.º 1
0
 /// <returns>total number of items in the sequence.</returns>
 public override int Size()
 {
     // The line map is always 2 entries larger than the number of lines in
     // the file. Index 0 is padded out/unused. The last index is the total
     // length of the buffer, and acts as a sentinel.
     //
     return(lines.Size() - 2);
 }
        private static int FindForwardLine(IntList lines, int idx, int ptr)
        {
            int end = lines.Size() - 2;

            while (idx < end && lines.Get(idx + 2) < ptr)
            {
                idx++;
            }
            return(idx);
        }