7 #include <botan/parsing.h>
8 #include <botan/exceptn.h>
12 std::map<std::string, std::string>
read_kv(
const std::string& kv)
14 std::map<std::string, std::string> m;
18 std::vector<std::string> parts;
24 catch(std::exception&)
30 bool reading_key =
true;
36 if(c ==
'\\' && !escaped)
40 else if(c ==
',' && !escaped)
45 if(m.find(cur_key) != m.end())
52 else if(c ==
'=' && !escaped)
54 if(reading_key ==
false)
72 if(reading_key ==
false)
74 if(m.find(cur_key) != m.end())
std::vector< std::string > split_on(const std::string &str, char delim)
std::map< std::string, std::string > read_kv(const std::string &kv)