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

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

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 | « no previous file | base/strings/string16.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 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 #ifndef MINI_CHROMIUM_BASE_STRINGS_STRING16_H_ 5 #ifndef MINI_CHROMIUM_BASE_STRINGS_STRING16_H_
6 #define MINI_CHROMIUM_BASE_STRINGS_STRING16_H_ 6 #define MINI_CHROMIUM_BASE_STRINGS_STRING16_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <stdio.h> 9 #include <stdio.h>
10 10
11 #include <string> 11 #include <string>
12 12
13 namespace base {
14
13 typedef uint16_t char16; 15 typedef uint16_t char16;
14 16
15 namespace base {
16
17 int c16memcmp(const char16* s1, const char16* s2, size_t n); 17 int c16memcmp(const char16* s1, const char16* s2, size_t n);
18 size_t c16len(const char16* s); 18 size_t c16len(const char16* s);
19 const char16* c16memchr(const char16* s, char16 c, size_t n); 19 const char16* c16memchr(const char16* s, char16 c, size_t n);
20 char16* c16memmove(char16* s1, const char16* s2, size_t n); 20 char16* c16memmove(char16* s1, const char16* s2, size_t n);
21 char16* c16memcpy(char16* s1, const char16* s2, size_t n); 21 char16* c16memcpy(char16* s1, const char16* s2, size_t n);
22 char16* c16memset(char16* s, char16 c, size_t n); 22 char16* c16memset(char16* s, char16 c, size_t n);
23 23
24 struct string16_char_traits { 24 struct string16_char_traits {
25 typedef char16 char_type; 25 typedef char16 char_type;
26 typedef int int_type; 26 typedef int int_type;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 81
82 static bool eq_int_type(const int_type& c1, const int_type& c2) { 82 static bool eq_int_type(const int_type& c1, const int_type& c2) {
83 return c1 == c2; 83 return c1 == c2;
84 } 84 }
85 85
86 static int_type eof() { 86 static int_type eof() {
87 return static_cast<int_type>(EOF); 87 return static_cast<int_type>(EOF);
88 } 88 }
89 }; 89 };
90 90
91 } // namespace base
92
93 extern template class std::basic_string<char16, base::string16_char_traits>;
94
95 typedef std::basic_string<char16, base::string16_char_traits> string16; 91 typedef std::basic_string<char16, base::string16_char_traits> string16;
96 92
97 namespace base {
98
99 extern std::ostream& operator<<(std::ostream& out, const string16& str); 93 extern std::ostream& operator<<(std::ostream& out, const string16& str);
100 94
101 } // namespace base 95 } // namespace base
102 96
97 extern template class std::basic_string<base::char16,
98 base::string16_char_traits>;
99
103 #endif // MINI_CHROMIUM_BASE_STRINGS_STRING16_H_ 100 #endif // MINI_CHROMIUM_BASE_STRINGS_STRING16_H_
OLDNEW
« no previous file with comments | « no previous file | base/strings/string16.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698