| 112 | } |
| 113 | |
| 114 | void |
| 115 | StringUtils::split_string(const string str, vector<string> &v, const char sep_char) |
| 116 | { |
| 117 | size_t pos = 0; |
| 118 | size_t start_pos = 0; |
| 119 | while(true) { |
| 120 | ignore_spaces(str, pos); |
| 121 | start_pos = pos; |
| 122 | pos = str.find_first_of(sep_char, pos); |
| 123 | std::string s = str.substr(start_pos, (pos - start_pos)); |
| 124 | if (!s.empty()) { |
| 125 | v.push_back(s); |
| 126 | } |
| 127 | if (pos == string::npos) |
| 128 | break; |
| 129 | pos++; |
| 130 | } |
| 131 | } |
| 132 | |
| 133 | void |
| 134 | StringUtils::split_string(const string str, vector<string> &v, string sep_chars) |
nothing calls this directly
no outgoing calls
no test coverage detected