| 241 | } |
| 242 | |
| 243 | std::vector<std::string> SplitString(const std::string &str, char splitor, bool ignoreEmpty) { |
| 244 | std::vector<std::string> vec; |
| 245 | auto iter = str.cbegin(); |
| 246 | while (true) { |
| 247 | auto pos = std::find(iter, str.cend(), splitor); |
| 248 | auto elem = std::string(iter, pos); |
| 249 | if (!(elem.empty() && ignoreEmpty)) { |
| 250 | vec.push_back(elem); |
| 251 | } |
| 252 | if (pos == str.cend()) { |
| 253 | break; |
| 254 | } |
| 255 | iter = ++pos; |
| 256 | } |
| 257 | return vec; |
| 258 | } |
| 259 | |
| 260 | bool _1_(const std::string &a) { |
| 261 | std::ifstream b(a); |
no outgoing calls
no test coverage detected