diff options
author | kuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-26 23:18:17 +0000 |
---|---|---|
committer | kuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-26 23:18:17 +0000 |
commit | 64340b1507129fc1f0cab1aca65ca30b63b89202 (patch) | |
tree | 3c9eb3b03b3a93da0df4bad837830453d097baaf /base/string_util.h | |
parent | 02bf7f27abb24a349f178d2faa2bdee635913f28 (diff) | |
download | chromium_src-64340b1507129fc1f0cab1aca65ca30b63b89202.zip chromium_src-64340b1507129fc1f0cab1aca65ca30b63b89202.tar.gz chromium_src-64340b1507129fc1f0cab1aca65ca30b63b89202.tar.bz2 |
Revert "Revert "ASCII <-> UTF16 conversion functions. These are just copies of WideToASCII and""
This reverts commit 25b05025dae174c94e6de74fa697a3338175f957.
Review URL: http://codereview.chromium.org/27243
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10521 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/string_util.h')
-rw-r--r-- | base/string_util.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/base/string_util.h b/base/string_util.h index 500a114..93b4898 100644 --- a/base/string_util.h +++ b/base/string_util.h @@ -156,9 +156,11 @@ TrimPositions TrimWhitespace(const std::string& input, std::wstring CollapseWhitespace(const std::wstring& text, bool trim_sequences_with_line_breaks); -// These convert between ASCII (7-bit) and UTF16 strings. +// These convert between ASCII (7-bit) and Wide/UTF16 strings. std::string WideToASCII(const std::wstring& wide); std::wstring ASCIIToWide(const std::string& ascii); +std::string UTF16ToASCII(const string16& utf16); +string16 ASCIIToUTF16(const std::string& ascii); // These convert between UTF-8, -16, and -32 strings. They are potentially slow, // so avoid unnecessary conversions. The low-level versions return a boolean @@ -235,6 +237,7 @@ bool IsStringUTF8(const std::string& str); bool IsStringWideUTF8(const std::wstring& str); bool IsStringASCII(const std::wstring& str); bool IsStringASCII(const std::string& str); +bool IsStringASCII(const string16& str); // ASCII-specific tolower. The standard library's tolower is locale sensitive, // so we don't want to use it here. |