| 205 | return; |
| 206 | } |
| 207 | std::vector<int> stringToDims(const std::string& str, const std::string& pattern) { |
| 208 | std::vector<int> res; |
| 209 | if (str == "") { |
| 210 | return res; |
| 211 | } |
| 212 | std::string strs = str + pattern; |
| 213 | size_t pos = strs.find(pattern); |
| 214 | |
| 215 | while (pos != strs.npos) { |
| 216 | std::string temp = strs.substr(0, pos); |
| 217 | std::istringstream tempIs(temp); |
| 218 | int p; |
| 219 | tempIs >> p; |
| 220 | res.push_back(p); |
| 221 | strs = strs.substr(pos + 1, strs.size()); |
| 222 | pos = strs.find(pattern); |
| 223 | } |
| 224 | |
| 225 | return res; |
| 226 | } |
| 227 | |
| 228 | std::vector<std::string> splitNames(const int size, const std::string names) { |
| 229 | std::vector<std::string> split(size); |