7 #include <packager/kv_pairs/kv_pairs.h>
9 #include <absl/strings/str_split.h>
13 std::vector<KVPair> SplitStringIntoKeyValuePairs(std::string_view str,
15 char list_separator) {
16 std::vector<KVPair> kv_pairs;
19 if (str.size() == 0) {
23 std::vector<std::string> kv_strings = absl::StrSplit(str, list_separator);
24 for (
const auto& kv_string : kv_strings) {
25 KVPair pair = absl::StrSplit(kv_string, absl::MaxSplits(kv_separator, 1));
26 kv_pairs.push_back(pair);
All the methods that are virtual are virtual for mocking.