| 37 | } |
| 38 | |
| 39 | std::vector<std::string> split(const std::string& s) { |
| 40 | std::vector<std::string> v; |
| 41 | size_t from = 0; |
| 42 | for (;;) { |
| 43 | const size_t c = s.find(',', from); |
| 44 | v.push_back(s.substr(from, c == std::string::npos ? std::string::npos : c - from)); |
| 45 | if (c == std::string::npos) break; |
| 46 | from = c + 1; |
| 47 | } |
| 48 | return v; |
| 49 | } |
| 50 | |
| 51 | uint64_t fnv(uint64_t h, const void* p, size_t n) { |
| 52 | const uint8_t* b = (const uint8_t*) p; |