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

Side by Side Diff: base/strings/utf_string_conversions.cc

Issue 705473002: lambda test Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | 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) 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/strings/utf_string_conversions.h" 5 #include "base/strings/utf_string_conversions.h"
6 6
7 #include "base/strings/string_piece.h" 7 #include "base/strings/string_piece.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/strings/utf_string_conversion_utils.h" 9 #include "base/strings/utf_string_conversion_utils.h"
10 10
11 #include <algorithm>
12 #include <vector>
13
14 void foo() {
15 std::vector<int> a;
16 std::sort(a.begin(), a.end(), [](int a, int b) { return a < b; });
17 }
18
11 namespace base { 19 namespace base {
12 20
13 namespace { 21 namespace {
14 22
15 // Generalized Unicode converter ----------------------------------------------- 23 // Generalized Unicode converter -----------------------------------------------
16 24
17 // Converts the given source Unicode character type to the given destination 25 // Converts the given source Unicode character type to the given destination
18 // Unicode character type as a STL string. The given input buffer and size 26 // Unicode character type as a STL string. The given input buffer and size
19 // determine the source, and the given output STL string will be replaced by 27 // determine the source, and the given output STL string will be replaced by
20 // the result. 28 // the result.
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 DCHECK(IsStringASCII(ascii)) << ascii; 226 DCHECK(IsStringASCII(ascii)) << ascii;
219 return string16(ascii.begin(), ascii.end()); 227 return string16(ascii.begin(), ascii.end());
220 } 228 }
221 229
222 std::string UTF16ToASCII(const string16& utf16) { 230 std::string UTF16ToASCII(const string16& utf16) {
223 DCHECK(IsStringASCII(utf16)) << UTF16ToUTF8(utf16); 231 DCHECK(IsStringASCII(utf16)) << UTF16ToUTF8(utf16);
224 return std::string(utf16.begin(), utf16.end()); 232 return std::string(utf16.begin(), utf16.end());
225 } 233 }
226 234
227 } // namespace base 235 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698