| Index: base/string_util.cc
|
| ===================================================================
|
| --- base/string_util.cc (revision 25852)
|
| +++ base/string_util.cc (working copy)
|
| @@ -744,6 +744,22 @@
|
| }
|
| }
|
|
|
| +bool EndsWith(const std::wstring& str,
|
| + const std::wstring& search,
|
| + bool case_sensitive) {
|
| + std::wstring::size_type str_length = str.length();
|
| + std::wstring::size_type search_length = search.length();
|
| + if (search_length > str_length)
|
| + return false;
|
| + if (case_sensitive) {
|
| + return str.compare(str_length - search_length, search_length, search) == 0;
|
| + } else {
|
| + return std::equal(search.begin(), search.end(),
|
| + str.begin() + (str_length - search_length),
|
| + CaseInsensitiveCompare<wchar_t>());
|
| + }
|
| +}
|
| +
|
| DataUnits GetByteDisplayUnits(int64 bytes) {
|
| // The byte thresholds at which we display amounts. A byte count is displayed
|
| // in unit U when kUnitThresholds[U] <= bytes < kUnitThresholds[U+1].
|
|
|
| Property changes on: base\string_util.cc
|
| ___________________________________________________________________
|
| Added: svn:mergeinfo
|
| Merged /branches/chrome_webkit_merge_branch/base/string_util.cc:r69-2775
|
| Merged /trunk/src/base/string_util.cc:r25487
|
|
|
|
|