1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef BASE_STRING_SPLIT_H_ 6 #define BASE_STRING_SPLIT_H_ 7 8 #include <string> 9 #include <utility> 10 #include <vector> 11 12 namespace base { 13 14 bool SplitStringIntoKeyValues( 15 const std::string& line, 16 char key_value_delimiter, 17 std::string* key, std::vector<std::string>* values); 18 19 bool SplitStringIntoKeyValuePairs( 20 const std::string& line, 21 char key_value_delimiter, 22 char key_value_pair_delimiter, 23 std::vector<std::pair<std::string, std::string> >* kv_pairs); 24 25 } // namespace base 26 27 #endif // BASE_STRING_SPLIT_H 28