| 23 | } |
| 24 | |
| 25 | std::vector<std::string> StringUtils::Split(const std::string &str, const std::string &delim) { |
| 26 | size_t pos_start{}, pos_end{}, delim_len = delim.length(); |
| 27 | std::string token{}; |
| 28 | std::vector<std::string> res{}; |
| 29 | while((pos_end = str.find(delim, pos_start)) != std::string::npos) { |
| 30 | token = str.substr(pos_start, pos_end - pos_start); |
| 31 | pos_start = pos_end + delim_len; |
| 32 | res.push_back(token); |
| 33 | } |
| 34 | res.push_back(str.substr(pos_start)); |
| 35 | return res; |
| 36 | } |
| 37 | |
| 38 | std::string StringUtils::LTrim(const std::string &str) { |
| 39 | auto result = str; |
nothing calls this directly
no outgoing calls
no test coverage detected