| 4119 | } |
| 4120 | |
| 4121 | void InStream::readStringTo(std::string &result) { |
| 4122 | if (NULL == reader) |
| 4123 | quit(_pe, "Expected line"); |
| 4124 | |
| 4125 | result.clear(); |
| 4126 | |
| 4127 | for (;;) { |
| 4128 | int cur = reader->curChar(); |
| 4129 | |
| 4130 | if (cur == LF || cur == EOFC) |
| 4131 | break; |
| 4132 | |
| 4133 | if (cur == CR) { |
| 4134 | cur = reader->nextChar(); |
| 4135 | if (reader->curChar() == LF) { |
| 4136 | reader->unreadChar(cur); |
| 4137 | break; |
| 4138 | } |
| 4139 | } |
| 4140 | |
| 4141 | lastLine = reader->getLine(); |
| 4142 | result += char(reader->nextChar()); |
| 4143 | } |
| 4144 | |
| 4145 | if (strict) |
| 4146 | readEoln(); |
| 4147 | else |
| 4148 | eoln(); |
| 4149 | } |
| 4150 | |
| 4151 | std::string InStream::readString() { |
| 4152 | readStringTo(_tmpReadToken); |
nothing calls this directly
no test coverage detected