| 455 | } |
| 456 | |
| 457 | void advance_to(const std::string& haystack, size_t& offset, char needle) { |
| 458 | |
| 459 | // I think std::string should behave correctly in this case, but just to be sure... |
| 460 | if(offset >= haystack.size()) |
| 461 | return; |
| 462 | offset = haystack.find(needle, offset); |
| 463 | if(offset == std::string::npos) |
| 464 | offset = haystack.size(); |
| 465 | |
| 466 | } |
| 467 | |
| 468 | long getReadNumberFromPileup(std::string const& fileName) { |
| 469 | string line ; |