OLD | NEW |
1 // Copyright 2009 The Chromium Authors. All rights reserved. | 1 // Copyright 2009 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_UTF_STRING_CONVERSIONS_H_ | 5 #ifndef MINI_CHROMIUM_BASE_STRINGS_UTF_STRING_CONVERSIONS_H_ |
6 #define MINI_CHROMIUM_BASE_STRINGS_UTF_STRING_CONVERSIONS_H_ | 6 #define MINI_CHROMIUM_BASE_STRINGS_UTF_STRING_CONVERSIONS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| 11 #include "base/strings/string_piece.h" |
11 | 12 |
12 namespace base { | 13 namespace base { |
13 | 14 |
14 bool UTF8ToUTF16(const char* src, size_t src_len, string16* output); | 15 bool UTF8ToUTF16(const char* src, size_t src_len, string16* output); |
15 string16 UTF8ToUTF16(const std::string& utf8); | 16 string16 UTF8ToUTF16(const std::string& utf8); |
16 bool UTF16ToUTF8(const char16* src, size_t src_len, std::string* output); | 17 bool UTF16ToUTF8(const char16* src, size_t src_len, std::string* output); |
17 std::string UTF16ToUTF8(const string16& utf16); | 18 std::string UTF16ToUTF8(const string16& utf16); |
| 19 string16 ASCIIToUTF16(const StringPiece& ascii); |
| 20 std::string UTF16ToASCII(const string16& utf16); |
18 | 21 |
19 } // namespace | 22 } // namespace base |
20 | 23 |
21 #endif // MINI_CHROMIUM_BASE_STRINGS_UTF_STRING_CONVERSIONS_H_ | 24 #endif // MINI_CHROMIUM_BASE_STRINGS_UTF_STRING_CONVERSIONS_H_ |
OLD | NEW |