| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 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/string_split.h" | 5 #include <stddef.h> |
| 6 #include <string> |
| 7 #include <utility> |
| 8 #include <vector> |
| 6 | 9 |
| 7 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/string16.h" |
| 8 #include "base/string_util.h" | 12 #include "base/string_util.h" |
| 9 #include "base/third_party/icu/icu_utf.h" | 13 #include "base/third_party/icu/icu_utf.h" |
| 10 #include "base/utf_string_conversions.h" | |
| 11 | 14 |
| 12 namespace base { | 15 namespace base { |
| 13 | 16 |
| 14 template<typename STR> | 17 template<typename STR> |
| 15 static void SplitStringT(const STR& str, | 18 static void SplitStringT(const STR& str, |
| 16 const typename STR::value_type s, | 19 const typename STR::value_type s, |
| 17 bool trim_whitespace, | 20 bool trim_whitespace, |
| 18 std::vector<STR>* r) { | 21 std::vector<STR>* r) { |
| 19 size_t last = 0; | 22 size_t last = 0; |
| 20 size_t i; | 23 size_t i; |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 SplitStringAlongWhitespaceT(str, result); | 222 SplitStringAlongWhitespaceT(str, result); |
| 220 } | 223 } |
| 221 #endif | 224 #endif |
| 222 | 225 |
| 223 void SplitStringAlongWhitespace(const std::string& str, | 226 void SplitStringAlongWhitespace(const std::string& str, |
| 224 std::vector<std::string>* result) { | 227 std::vector<std::string>* result) { |
| 225 SplitStringAlongWhitespaceT(str, result); | 228 SplitStringAlongWhitespaceT(str, result); |
| 226 } | 229 } |
| 227 | 230 |
| 228 } // namespace base | 231 } // namespace base |
| OLD | NEW |