| 30 | INI2Pb::~INI2Pb() {} |
| 31 | |
| 32 | static void StrSplitList(const string &str, const string &delimiters, vector<string> &results) { |
| 33 | results.clear(); |
| 34 | auto last = 0; |
| 35 | auto found = str.find_first_of(delimiters); |
| 36 | while (string::npos != found) { |
| 37 | auto r = str.substr(last, found - last); |
| 38 | last = found + 1; |
| 39 | found = str.find_first_of(delimiters, last); |
| 40 | if (!r.empty()) results.push_back(r); |
| 41 | } |
| 42 | auto r = str.substr(last); |
| 43 | if (!r.empty()) results.push_back(r); |
| 44 | } |
| 45 | |
| 46 | |
| 47 | bool INI2Pb::ParseField(google::protobuf::Message *message, const string §ion_name, |