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

Unified Diff: app/l10n_util.cc

Issue 194060: Add a "ToUpper" method (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « app/l10n_util.h ('k') | app/l10n_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/l10n_util.cc
===================================================================
--- app/l10n_util.cc (revision 25647)
+++ app/l10n_util.cc (working copy)
@@ -647,6 +647,15 @@
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.
« no previous file with comments | « app/l10n_util.h ('k') | app/l10n_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698