diff options
author | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-26 19:27:24 +0000 |
---|---|---|
committer | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-26 19:27:24 +0000 |
commit | f0fcfd3fe4f8b9f06608f9a6456f585cf82d9730 (patch) | |
tree | 8bd521ba25b97de5f71736937ad756ce704e1d5d /base/string_util.h | |
parent | 2539eda33909f9efc27ac403e964e140eaf3dd84 (diff) | |
download | chromium_src-f0fcfd3fe4f8b9f06608f9a6456f585cf82d9730.zip chromium_src-f0fcfd3fe4f8b9f06608f9a6456f585cf82d9730.tar.gz chromium_src-f0fcfd3fe4f8b9f06608f9a6456f585cf82d9730.tar.bz2 |
Add UTF8 <-> UTF-16 conversion functions, and a WebCore::String -> std::string function. We already have a std::string -> WebCore::String function.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1393 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/string_util.h')
-rw-r--r-- | base/string_util.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/base/string_util.h b/base/string_util.h index 7245dc9..bd95589 100644 --- a/base/string_util.h +++ b/base/string_util.h @@ -180,6 +180,11 @@ std::string16 WideToUTF16(const std::wstring& wide); bool UTF16ToWide(const char16* src, size_t src_len, std::wstring* output); std::wstring UTF16ToWide(const std::string16& utf8); +bool UTF8ToUTF16(const char* src, size_t src_len, std::string16* output); +std::string16 UTF8ToUTF16(const std::string& utf8); +bool UTF16ToUTF8(const char16* src, size_t src_len, std::string* output); +std::string UTF16ToUTF8(const std::string16& utf16); + // Defines the error handling modes of WideToCodepage and CodepageToWide. class OnStringUtilConversionError { public: |