List of usage examples for java.text StringCharacterIterator StringCharacterIterator
public StringCharacterIterator(String text, int begin, int end, int pos)
From source file:Main.java
public static void main(String[] args) { String text = "this is a test"; CharacterIterator it = new StringCharacterIterator(text, 4, 27, 5); for (char ch = it.first(); ch != CharacterIterator.DONE; ch = it.next()) { System.out.print(ch);//from ww w. j a v a 2 s .c om } }