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

Side by Side Diff: base/string_split.cc

Issue 6930047: wstring: remove wstring version of SplitString (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright Created 9 years, 7 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
OLDNEW
1 // Copyright (c) 2010 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"
11 11
(...skipping 16 matching lines...) Expand all
28 TrimWhitespace(tmp, TRIM_ALL, &t_tmp); 28 TrimWhitespace(tmp, TRIM_ALL, &t_tmp);
29 r->push_back(t_tmp); 29 r->push_back(t_tmp);
30 } else { 30 } else {
31 r->push_back(tmp); 31 r->push_back(tmp);
32 } 32 }
33 last = i + 1; 33 last = i + 1;
34 } 34 }
35 } 35 }
36 } 36 }
37 37
38 void SplitString(const std::wstring& str,
39 wchar_t c,
40 std::vector<std::wstring>* r) {
41 SplitStringT(str, c, true, r);
42 }
43
44 #if !defined(WCHAR_T_IS_UTF16)
45 void SplitString(const string16& str, 38 void SplitString(const string16& str,
46 char16 c, 39 char16 c,
47 std::vector<string16>* r) { 40 std::vector<string16>* r) {
48 DCHECK(CBU16_IS_SINGLE(c)); 41 DCHECK(CBU16_IS_SINGLE(c));
49 SplitStringT(str, c, true, r); 42 SplitStringT(str, c, true, r);
50 } 43 }
51 #endif
52 44
53 void SplitString(const std::string& str, 45 void SplitString(const std::string& str,
54 char c, 46 char c,
55 std::vector<std::string>* r) { 47 std::vector<std::string>* r) {
56 DCHECK(c >= 0 && c < 0x7F); 48 DCHECK(c >= 0 && c < 0x7F);
57 SplitStringT(str, c, true, r); 49 SplitStringT(str, c, true, r);
58 } 50 }
59 51
60 bool SplitStringIntoKeyValues( 52 bool SplitStringIntoKeyValues(
61 const std::string& line, 53 const std::string& line,
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 SplitStringAlongWhitespaceT(str, result); 211 SplitStringAlongWhitespaceT(str, result);
220 } 212 }
221 #endif 213 #endif
222 214
223 void SplitStringAlongWhitespace(const std::string& str, 215 void SplitStringAlongWhitespace(const std::string& str,
224 std::vector<std::string>* result) { 216 std::vector<std::string>* result) {
225 SplitStringAlongWhitespaceT(str, result); 217 SplitStringAlongWhitespaceT(str, result);
226 } 218 }
227 219
228 } // namespace base 220 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698