BreakIterator: getLineInstance(Locale locale)
import java.text.BreakIterator; import java.util.Locale; public class Main { public static void main(String[] argv) throws Exception { BreakIterator iterator = BreakIterator.getLineInstance(Locale.CANADA); iterator.setText("line1\nline2"); for (int index = iterator.first(); index != BreakIterator.DONE; index = iterator.next()) { System.out.println(index); } } }