diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-18 21:30:36 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-18 21:30:36 +0000 |
commit | 016d78de3eb0ee784728c99836cb42753e8dea60 (patch) | |
tree | 398679128dd10491063194548ae93fb3115fad19 /base/string_util.h | |
parent | 7b0ac2b15ccf3652097cb87d60f34f6bfda6388a (diff) | |
download | chromium_src-016d78de3eb0ee784728c99836cb42753e8dea60.zip chromium_src-016d78de3eb0ee784728c99836cb42753e8dea60.tar.gz chromium_src-016d78de3eb0ee784728c99836cb42753e8dea60.tar.bz2 |
Convert FormatBytes to string16.
I considered ASCII, but it's producing what is intended to be a
human-readable string. For example, in theory the "bytes/s" annotation
could be localized into a language where the "b" is non-ASCII.
Review URL: http://codereview.chromium.org/3107021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56603 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/string_util.h')
-rw-r--r-- | base/string_util.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/base/string_util.h b/base/string_util.h index c69b2de..4419b79 100644 --- a/base/string_util.h +++ b/base/string_util.h @@ -417,16 +417,16 @@ DataUnits GetByteDisplayUnits(int64 bytes); // specified by 'units', with an optional unit suffix. // Ex: FormatBytes(512, DATA_UNITS_KIBIBYTE, true) => "0.5 KB" // Ex: FormatBytes(10*1024, DATA_UNITS_MEBIBYTE, false) => "0.1" -std::wstring FormatBytes(int64 bytes, DataUnits units, bool show_units); +string16 FormatBytes(int64 bytes, DataUnits units, bool show_units); // As above, but with "/s" units. // Ex: FormatSpeed(512, DATA_UNITS_KIBIBYTE, true) => "0.5 KB/s" // Ex: FormatSpeed(10*1024, DATA_UNITS_MEBIBYTE, false) => "0.1" -std::wstring FormatSpeed(int64 bytes, DataUnits units, bool show_units); +string16 FormatSpeed(int64 bytes, DataUnits units, bool show_units); // Return a number formated with separators in the user's locale way. // Ex: FormatNumber(1234567) => 1,234,567 -std::wstring FormatNumber(int64 number); +string16 FormatNumber(int64 number); // Starting at |start_offset| (usually 0), replace the first instance of // |find_this| with |replace_with|. |