sS charIteratorToString_max(CharacterIterator it, int max) { if (it == null) null; new StringBuilder buf; while (max > 0 && it.hasNext()) buf.append(it.next()); ret str(buf); }