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

Side by Side Diff: base/i18n/case_conversion.cc

Issue 18252003: Replace third_party/icu/public with third_party/icu/source (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: roll ICU to 211851 Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/i18n/break_iterator.cc ('k') | base/i18n/char_iterator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/i18n/case_conversion.h" 5 #include "base/i18n/case_conversion.h"
6 6
7 #include "base/strings/string16.h" 7 #include "base/strings/string16.h"
8 #include "third_party/icu/public/common/unicode/unistr.h" 8 #include "third_party/icu/source/common/unicode/unistr.h"
9 9
10 namespace base { 10 namespace base {
11 namespace i18n { 11 namespace i18n {
12 12
13 string16 ToLower(const StringPiece16& string) { 13 string16 ToLower(const StringPiece16& string) {
14 icu::UnicodeString unicode_string(string.data(), string.size()); 14 icu::UnicodeString unicode_string(string.data(), string.size());
15 unicode_string.toLower(); 15 unicode_string.toLower();
16 return string16(unicode_string.getBuffer(), unicode_string.length()); 16 return string16(unicode_string.getBuffer(), unicode_string.length());
17 } 17 }
18 18
19 string16 ToUpper(const StringPiece16& string) { 19 string16 ToUpper(const StringPiece16& string) {
20 icu::UnicodeString unicode_string(string.data(), string.size()); 20 icu::UnicodeString unicode_string(string.data(), string.size());
21 unicode_string.toUpper(); 21 unicode_string.toUpper();
22 return string16(unicode_string.getBuffer(), unicode_string.length()); 22 return string16(unicode_string.getBuffer(), unicode_string.length());
23 } 23 }
24 24
25 } // namespace i18n 25 } // namespace i18n
26 } // namespace base 26 } // namespace base
OLDNEW
« no previous file with comments | « base/i18n/break_iterator.cc ('k') | base/i18n/char_iterator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698