| 253 | //------------------------------------------------------------------------------ |
| 254 | |
| 255 | static int my_getline(istream& in, std::string& out, char delimiter) |
| 256 | { |
| 257 | out = std::string(); |
| 258 | unsigned int numCharactersRead = 0; |
| 259 | int nextValue = 0; |
| 260 | |
| 261 | while ((nextValue = in.get()) != EOF && numCharactersRead < out.max_size()) |
| 262 | { |
| 263 | ++numCharactersRead; |
| 264 | |
| 265 | char downcast = static_cast<char>(nextValue); |
| 266 | if (downcast != delimiter && downcast != 0x0d) |
| 267 | { |
| 268 | out += downcast; |
| 269 | } |
| 270 | else |
| 271 | { |
| 272 | return numCharactersRead; |
| 273 | } |
| 274 | } |
| 275 | |
| 276 | return numCharactersRead; |
| 277 | } |
| 278 | VTK_ABI_NAMESPACE_END |
no test coverage detected