String (char boundaryChar, boolean ignoreEol) { int start = myPosition; for (; myPosition < myText.length(); myPosition++) { final char ch = myText.charAt(myPosition); if (ch == boundaryChar) { final String rc = myText.substring(start, myPosition); myPosition++; return rc; } if (!ignoreEol && isEol()) { return myText.substring(start, myPosition); } } throw new IllegalStateException("Unexpected text end at " + myPosition); }