| 249 | ////////////////////////////////////////////////////////////////////////// |
| 250 | |
| 251 | stringVector delimitedStringToVector(const std::string& _string, const std::string& _delimiter, bool sort) |
| 252 | { |
| 253 | stringVector vector; |
| 254 | size_t start = 0; |
| 255 | size_t comma = _string.find(_delimiter); |
| 256 | |
| 257 | while(comma != std::string::npos) |
| 258 | { |
| 259 | vector.push_back(_string.substr(start, comma - start)); |
| 260 | start = comma + 1; |
| 261 | comma = _string.find(_delimiter, start); |
| 262 | } |
| 263 | |
| 264 | vector.push_back(_string.substr(start)); |
| 265 | if (sort) |
| 266 | std::sort(vector.begin(), vector.end()); |
| 267 | |
| 268 | return vector; |
| 269 | |
| 270 | } // delimitedStringToVector |
| 271 | |
| 272 | ////////////////////////////////////////////////////////////////////////// |
| 273 |
no test coverage detected