diff options
Diffstat (limited to 'base/strings/utf_string_conversions.h')
-rw-r--r-- | base/strings/utf_string_conversions.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/base/strings/utf_string_conversions.h b/base/strings/utf_string_conversions.h index 06a3bc6476..2995f4cbcf 100644 --- a/base/strings/utf_string_conversions.h +++ b/base/strings/utf_string_conversions.h @@ -5,6 +5,8 @@ #ifndef BASE_STRINGS_UTF_STRING_CONVERSIONS_H_ #define BASE_STRINGS_UTF_STRING_CONVERSIONS_H_ +#include <stddef.h> + #include <string> #include "base/base_export.h" @@ -24,7 +26,7 @@ BASE_EXPORT bool WideToUTF8(const wchar_t* src, size_t src_len, BASE_EXPORT std::string WideToUTF8(const std::wstring& wide); BASE_EXPORT bool UTF8ToWide(const char* src, size_t src_len, std::wstring* output); -BASE_EXPORT std::wstring UTF8ToWide(const StringPiece& utf8); +BASE_EXPORT std::wstring UTF8ToWide(StringPiece utf8); BASE_EXPORT bool WideToUTF16(const wchar_t* src, size_t src_len, string16* output); @@ -34,18 +36,18 @@ BASE_EXPORT bool UTF16ToWide(const char16* src, size_t src_len, BASE_EXPORT std::wstring UTF16ToWide(const string16& utf16); BASE_EXPORT bool UTF8ToUTF16(const char* src, size_t src_len, string16* output); -BASE_EXPORT string16 UTF8ToUTF16(const StringPiece& utf8); +BASE_EXPORT string16 UTF8ToUTF16(StringPiece utf8); BASE_EXPORT bool UTF16ToUTF8(const char16* src, size_t src_len, std::string* output); -BASE_EXPORT std::string UTF16ToUTF8(const string16& utf16); +BASE_EXPORT std::string UTF16ToUTF8(StringPiece16 utf16); // This converts an ASCII string, typically a hardcoded constant, to a UTF16 // string. -BASE_EXPORT string16 ASCIIToUTF16(const StringPiece& ascii); +BASE_EXPORT string16 ASCIIToUTF16(StringPiece ascii); // Converts to 7-bit ASCII by truncating. The result must be known to be ASCII // beforehand. -BASE_EXPORT std::string UTF16ToASCII(const string16& utf16); +BASE_EXPORT std::string UTF16ToASCII(StringPiece16 utf16); } // namespace base |