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

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

Issue 1125773004: Pull in ASCII<->UTF16 from Chromium (Closed) Base URL: https://chromium.googlesource.com/chromium/mini_chromium@master
Patch Set: Created 5 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
OLDNEW
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698