| 255 | } |
| 256 | |
| 257 | bool DictionaryParse(const string& encoded_str, |
| 258 | vector<pair<string, string> >* items) { |
| 259 | vector<string> entries; |
| 260 | SplitStringUsing(encoded_str, ",", &entries); |
| 261 | for (const auto& entry : entries) { |
| 262 | vector<string> fields; |
| 263 | SplitStringAllowEmpty(entry, ":", &fields); |
| 264 | if (fields.size() != 2) // parsing error |
| 265 | return false; |
| 266 | items->push_back(make_pair(fields[0], fields[1])); |
| 267 | } |
| 268 | return true; |
| 269 | } |
| 270 | |
| 271 | bool DictionaryInt32Decode(unordered_map<string, int32>* dictionary, |
| 272 | const string& encoded_str) { |
no test coverage detected