| 18 | } |
| 19 | |
| 20 | std::vector<std::string> strsplit(const std::string& s, char del) { |
| 21 | std::vector<std::string> v; |
| 22 | std::string::const_iterator i1 = s.begin(), i2; |
| 23 | while (true) { |
| 24 | i2 = std::find(i1, s.end(), del); |
| 25 | v.emplace_back(i1, i2); |
| 26 | if (i2 == s.end()) break; |
| 27 | i1 = i2 + 1; |
| 28 | } |
| 29 | return v; |
| 30 | } |
| 31 | |
| 32 | #if defined(NO_FMTLIB) |
| 33 | std::string format(const char* fmt, ...) { |
no outgoing calls