int index = Utilities.getTabbedTextOffset(s, fm, start, end, t, pos, false);
int fullIndex = offset + index;
BreakIterator bi = BreakIterator.getWordInstance();
bi.setText(s);
if (bi.last() <= fullIndex) {
return bi.last() - offset;
}
if (bi.isBoundary(fullIndex)) {
return Character.isWhitespace(s.array[fullIndex]) ? index + 1 : index;
}
int prev = bi.preceding(fullIndex);