public int nextInt() { if (!hasNext()) throw new NoSuchElementException(); // TODO: It probably would be faster if the logic from // the following two methods were inlined and simplified. int cp = Character.codePointAt(CharSequence.this, cur); cur += Character.charCount(cp); return cp; }
@Override public void forEachInt(IntConsumer block) { while (cur < length()) { int cp = Character.codePointAt(CharSequence.this, cur); cur += Character.charCount(cp); block.accept(cp); } }