| 150 | } |
| 151 | |
| 152 | void |
| 153 | StringUtils::split_int_string(const string str, vector<int> &values, string sep_chars) |
| 154 | { |
| 155 | size_t pos = 0; |
| 156 | size_t start_pos = 0; |
| 157 | while(true) { |
| 158 | ignore_spaces(str, pos); |
| 159 | start_pos = pos; |
| 160 | pos = find_any_char(str, pos, sep_chars); |
| 161 | std::string s = str.substr(start_pos, (pos - start_pos)); |
| 162 | if (!s.empty()) { |
| 163 | values.push_back(str2int(s)); |
| 164 | } |
| 165 | if (pos == string::npos) |
| 166 | break; |
| 167 | pos++; |
| 168 | } |
| 169 | } |
| 170 | |
| 171 | /* convert string to number, take care of surrounding parentheses */ |
| 172 | int |
nothing calls this directly
no outgoing calls
no test coverage detected