Created
March 3, 2011 09:12
-
-
Save taka2/852541 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.text.BreakIterator; | |
| public class test | |
| { | |
| public static void main(String[] args) throws Exception | |
| { | |
| BreakIterator bi = BreakIterator.getLineInstance(); | |
| bi.setText("first line.\nsecond line.\nthird line."); | |
| bi.following(36); | |
| //bi.preceding(36); | |
| } | |
| } | |
| /* | |
| Exception in thread "main" java.lang.IllegalArgumentException: offset out of bounds | |
| at java.text.RuleBasedBreakIterator.checkOffset(RuleBasedBreakIterator.java:724) | |
| at java.text.RuleBasedBreakIterator.following(RuleBasedBreakIterator.java:737) | |
| at test.main(test.java:9) | |
| */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment