OLD | NEW |
1 // Copyright (c) 2009 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium OS Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROMEOS_STRING_H_ | 5 #ifndef CHROMEOS_STRING_H_ |
6 #define CHROMEOS_STRING_H_ | 6 #define CHROMEOS_STRING_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 namespace chromeos { | 11 namespace chromeos { |
12 | 12 |
13 void SplitString(const std::string& str, std::vector<std::string>* parts); | 13 void SplitString(const std::string& str, std::vector<std::string>* parts); |
14 | 14 |
15 void SplitStringUsing(const std::string& str, | 15 void SplitStringUsing(const std::string& str, |
16 const std::string& delim, | 16 const std::string& delim, |
17 std::vector<std::string>* parts); | 17 std::vector<std::string>* parts); |
18 | 18 |
| 19 // Copies the string. Use delete (not delete [] or free) to release the returned |
| 20 // string. |
| 21 char* NewStringCopy(const char* x); |
| 22 |
19 } // namespace chromeos | 23 } // namespace chromeos |
20 | 24 |
21 #endif /* CHROMEOS_STRING_H_ */ | 25 #endif /* CHROMEOS_STRING_H_ */ |
22 | 26 |
OLD | NEW |