return getTabbedTextOffset(s, fm, x0, x, te, p0, true);
int pos; int currentX = x0;  for (pos = 0; pos < s.count; pos++) { char nextChar = s.array[s.offset+pos];  if (nextChar == 0) { if (! round && pos > 0) pos--; break; } if (nextChar != '\t') currentX += fm.charWidth(nextChar); else { if (te == null) currentX += fm.charWidth(' '); else currentX = (int) te.nextTabStop(currentX, pos); }  if (currentX >= x) { if (! round && pos > 0) pos--; break; } } return pos + p0;
  public static final int getTabbedTextOffset(Segment s, FontMetrics fm, int x0,                                              int x, TabExpander te, int p0)  {    return getTabbedTextOffset(s, fm, x0, x, te, p0, true);  }