Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: base/string_split.cc

Issue 8008003: wstring: remove SplitStringAlongWhitespace for wchar (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/string_split.h ('k') | base/string_split_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/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/third_party/icu/icu_utf.h" 9 #include "base/third_party/icu/icu_utf.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 } 193 }
194 break; 194 break;
195 } 195 }
196 } 196 }
197 if (!last_was_ws) { 197 if (!last_was_ws) {
198 result->push_back( 198 result->push_back(
199 str.substr(last_non_ws_start, length - last_non_ws_start)); 199 str.substr(last_non_ws_start, length - last_non_ws_start));
200 } 200 }
201 } 201 }
202 202
203 void SplitStringAlongWhitespace(const std::wstring& str,
204 std::vector<std::wstring>* result) {
205 SplitStringAlongWhitespaceT(str, result);
206 }
207
208 #if !defined(WCHAR_T_IS_UTF16)
209 void SplitStringAlongWhitespace(const string16& str, 203 void SplitStringAlongWhitespace(const string16& str,
210 std::vector<string16>* result) { 204 std::vector<string16>* result) {
211 SplitStringAlongWhitespaceT(str, result); 205 SplitStringAlongWhitespaceT(str, result);
212 } 206 }
213 #endif
214 207
215 void SplitStringAlongWhitespace(const std::string& str, 208 void SplitStringAlongWhitespace(const std::string& str,
216 std::vector<std::string>* result) { 209 std::vector<std::string>* result) {
217 SplitStringAlongWhitespaceT(str, result); 210 SplitStringAlongWhitespaceT(str, result);
218 } 211 }
219 212
220 } // namespace base 213 } // namespace base
OLDNEW
« no previous file with comments | « base/string_split.h ('k') | base/string_split_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698