| 96 | } |
| 97 | |
| 98 | int stringToInt(const std::string& s) { |
| 99 | std::stringstream ss(s); |
| 100 | int val; |
| 101 | if (!(ss >> val)) { |
| 102 | throw BoutException("Could not convert string '{:s}' to int\n", s); |
| 103 | } |
| 104 | return val; |
| 105 | } |
| 106 | |
| 107 | std::list<std::string>& strsplit(const std::string& s, char delim, |
| 108 | std::list<std::string>& elems) { |