diff options
author | paul@chromium.org <paul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-09 22:55:04 +0000 |
---|---|---|
committer | paul@chromium.org <paul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-09 22:55:04 +0000 |
commit | bcc9ae958d2f957a8deb766f994b3039758e4ee6 (patch) | |
tree | 03d62d7bfa6add64039a3873d3e205e4e1b69f9b /app/l10n_util.cc | |
parent | f3edc51bfb87650346ec6f3a39086cbaded71c0b (diff) | |
download | chromium_src-bcc9ae958d2f957a8deb766f994b3039758e4ee6.zip chromium_src-bcc9ae958d2f957a8deb766f994b3039758e4ee6.tar.gz chromium_src-bcc9ae958d2f957a8deb766f994b3039758e4ee6.tar.bz2 |
Add a "ToUpper" method.
BUG=None.
TEST=Covered by new unittest.
Review URL: http://codereview.chromium.org/194060
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25809 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app/l10n_util.cc')
-rw-r--r-- | app/l10n_util.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/l10n_util.cc b/app/l10n_util.cc index d22425b..a58defb 100644 --- a/app/l10n_util.cc +++ b/app/l10n_util.cc @@ -647,6 +647,15 @@ string16 ToLower(const string16& string) { return result; } +string16 ToUpper(const string16& string) { + icu::UnicodeString upper_u_str( + icu::UnicodeString(string.c_str()).toUpper(icu::Locale::getDefault())); + string16 result; + upper_u_str.extract(0, upper_u_str.length(), + WriteInto(&result, upper_u_str.length() + 1)); + return result; +} + // Returns the text direction for the default ICU locale. It is assumed // that SetICUDefaultLocale has been called to set the default locale to // the UI locale of Chrome. |