CharacterIterator.DONE : CharacterIterator « java.text « Java by API






CharacterIterator.DONE

 


import java.text.CharacterIterator;
import java.text.StringCharacterIterator;

public class Main {
  private static final String text = "this is a test";

  public static void main(String[] args) {
    CharacterIterator it = new StringCharacterIterator(text);

    for (char ch = it.last(); ch != CharacterIterator.DONE; ch = it.previous()) {
      System.out.print(ch);
    }
  }
}

   
  








Related examples in the same category

1.CharacterIterator: current()
2.CharacterIterator: first()
3.CharacterIterator: getIndex()
4.CharacterIterator: last()
5.CharacterIterator: previous()
6.CharacterIterator: setIndex(int position)