| 598 | } |
| 599 | |
| 600 | void StringSplit2Set(const std::string& s, char delim, std::unordered_set<std::string>& elems) { |
| 601 | elems.clear(); |
| 602 | std::stringstream ss(s); |
| 603 | std::string item; |
| 604 | while (std::getline(ss, item, delim)) { |
| 605 | item = pstd::StringTrim(item); |
| 606 | if (!item.empty()) { |
| 607 | elems.emplace(item); |
| 608 | } |
| 609 | } |
| 610 | } |
| 611 | |
| 612 | std::string Set2String(const std::unordered_set<std::string>& elems, char delim) { |
| 613 | std::string value; |
no test coverage detected