BreakIterator: getSentenceInstance(Locale locale) : BreakIterator « java.text « Java by API






BreakIterator: getSentenceInstance(Locale locale)

 

import java.text.BreakIterator;
import java.util.Locale;

public class Main {
  public static void main(String[] argv) throws Exception {

    BreakIterator iterator = BreakIterator.getSentenceInstance(Locale.CANADA);
    iterator.setText("this is a test.");
    for (int index = iterator.first(); index != BreakIterator.DONE; index = iterator.next()) {
      System.out.println(index);
    }
  }
}

   
  








Related examples in the same category

1.BreakIterator.DONE
2.BreakIterator: getCharacterInstance(Locale locale)
3.BreakIterator: getLineInstance(Locale locale)
4.BreakIterator: getWordInstance(Locale locale)
5.BreakIterator: first()
6.BreakIterator: setText(String newText)