int pos;
int found = s.count;
  public static final int getTabbedTextOffset(Segment s, FontMetrics fm, int x0,                                              int x, TabExpander te, int p0,                                              boolean round)  {    // At the end of the for loop, this holds the requested model location    int pos;    int currentX = x0;    int width = 0;    for (pos = 0; pos < s.count; pos++)      {        char nextChar = s.array[s.offset+pos];                if (nextChar == 0)            break;                if (nextChar != '\t')          width = fm.charWidth(nextChar);        else          {            if (te == null)              width = fm.charWidth(' ');            else              width = ((int) te.nextTabStop(currentX, pos)) - currentX;          }                if (round)          {            if (currentX + (width>>1) > x)              break;          }        else          {            if (currentX + width > x)            break;          }                currentX += width;      }    return pos;  }