OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium 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 #include "base/strings/string_split.h" | 5 #include "base/strings/string_split.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "base/strings/utf_string_conversions.h" |
9 #include "base/third_party/icu/icu_utf.h" | 10 #include "base/third_party/icu/icu_utf.h" |
10 #include "base/utf_string_conversions.h" | |
11 | 11 |
12 namespace base { | 12 namespace base { |
13 | 13 |
14 template<typename STR> | 14 template<typename STR> |
15 static void SplitStringT(const STR& str, | 15 static void SplitStringT(const STR& str, |
16 const typename STR::value_type s, | 16 const typename STR::value_type s, |
17 bool trim_whitespace, | 17 bool trim_whitespace, |
18 std::vector<STR>* r) { | 18 std::vector<STR>* r) { |
19 r->clear(); | 19 r->clear(); |
20 size_t last = 0; | 20 size_t last = 0; |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 std::vector<string16>* result) { | 211 std::vector<string16>* result) { |
212 SplitStringAlongWhitespaceT(str, result); | 212 SplitStringAlongWhitespaceT(str, result); |
213 } | 213 } |
214 | 214 |
215 void SplitStringAlongWhitespace(const std::string& str, | 215 void SplitStringAlongWhitespace(const std::string& str, |
216 std::vector<std::string>* result) { | 216 std::vector<std::string>* result) { |
217 SplitStringAlongWhitespaceT(str, result); | 217 SplitStringAlongWhitespaceT(str, result); |
218 } | 218 } |
219 | 219 |
220 } // namespace base | 220 } // namespace base |
OLD | NEW |