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

Unified Diff: base/i18n/number_formatting.h

Issue 7189076: Localize strings, speeds. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright dates Created 9 years, 6 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
Index: base/i18n/number_formatting.h
diff --git a/base/i18n/number_formatting.h b/base/i18n/number_formatting.h
index f5ec083ab911d74cd22de35cd49df03a4cb14a97..5df7f17bbe504f9565b2a2b719c4c7d6458d17df 100644
--- a/base/i18n/number_formatting.h
+++ b/base/i18n/number_formatting.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -11,8 +11,24 @@
namespace base {
+// Return a number formatted with separators in the user's locale.
+// Ex: FormatNumber(1234567)
+// => "1,234,567" in English, "1.234.567" in German
string16 FormatNumber(int64 number);
+// Return a number formatted with separators in the user's locale.
+// Ex: FormatDouble(1234567.8, 1)
+// => "1,234,567.8" in English, "1.234.567,8" in German
+string16 FormatDouble(double number, int fractional_digits);
+
+namespace testing {
+
+// Causes cached formatters to be discarded and recreated. Only useful for
+// testing.
+void ResetFormatters();
+
+} // namespace testing
+
} // namespace base
#endif // BASE_I18N_NUMBER_FORMATTING_H_
« no previous file with comments | « base/base.gyp ('k') | base/i18n/number_formatting.cc » ('j') | base/i18n/number_formatting.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698