| 31 | namespace misc |
| 32 | { |
| 33 | std::vector<std::string> splitString(std::string const& input, std::string const& delimiter) |
| 34 | { |
| 35 | std::regex re(delimiter); |
| 36 | // passing -1 as the submatch index parameter performs splitting |
| 37 | std::sregex_token_iterator first{input.begin(), input.end(), re, -1}; |
| 38 | std::sregex_token_iterator last; |
| 39 | |
| 40 | return {first, last}; |
| 41 | } |
| 42 | } // namespace misc |
| 43 | } // namespace pmacc |
no test coverage detected