sS shortenJoin(int max, Iterable l) { new StringBuilder buf; fOr (S s : l) { buf.append(s); if (l(buf) > max) break; } ret shorten(max, str(buf)); }