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

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

Issue 803593002: Move string16 and char16 in to base:: (Closed) Base URL: https://chromium.googlesource.com/chromium/mini_chromium@master
Patch Set: Created 6 years 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 | « base/strings/string16.h ('k') | 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 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright 2006-2008 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/string16.h" 5 #include "base/strings/string16.h"
6 6
7 #include <ostream> 7 #include <ostream>
8 8
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 char16* c16memset(char16* s, char16 c, size_t n) { 50 char16* c16memset(char16* s, char16 c, size_t n) {
51 char16 *s_orig = s; 51 char16 *s_orig = s;
52 while (n-- > 0) { 52 while (n-- > 0) {
53 *s = c; 53 *s = c;
54 ++s; 54 ++s;
55 } 55 }
56 return s_orig; 56 return s_orig;
57 } 57 }
58 58
59 } // namespace base
60
61 template class std::basic_string<char16, base::string16_char_traits>;
62
63 namespace base {
64
65 std::ostream& operator<<(std::ostream& out, const string16& str) { 59 std::ostream& operator<<(std::ostream& out, const string16& str) {
66 return out << UTF16ToUTF8(str); 60 return out << UTF16ToUTF8(str);
67 } 61 }
68 62
69 } // namespace base 63 } // namespace base
64
65 template class std::basic_string<base::char16, base::string16_char_traits>;
OLDNEW
« no previous file with comments | « base/strings/string16.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698