| 22 | } |
| 23 | |
| 24 | void TextReader::NextLine() { |
| 25 | while (_currentIndex < _text.size()) { |
| 26 | char ch = _text[_currentIndex]; |
| 27 | if (ch == '\n' || ch == '\r') { |
| 28 | _currentIndex++; |
| 29 | if (ch == '\r' && _currentIndex < _text.size() && _text[_currentIndex] == '\n') { |
| 30 | _currentIndex++; |
| 31 | } |
| 32 | break; |
| 33 | } |
| 34 | _currentIndex++; |
| 35 | } |
| 36 | |
| 37 | if (_currentIndex >= _text.size()) { |
| 38 | _isEof = true; |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | void TextReader::SaveAndNext() { |
| 43 | Save(); |