Home | History | Annotate | Download | only in i18n
      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
      3 // found in the LICENSE file.
      4 
      5 #include "base/i18n/case_conversion.h"
      6 
      7 #include "base/strings/string16.h"
      8 #include "third_party/icu/source/common/unicode/unistr.h"
      9 
     10 namespace base {
     11 namespace i18n {
     12 
     13 string16 ToLower(const StringPiece16& string) {
     14   icu::UnicodeString unicode_string(string.data(), string.size());
     15   unicode_string.toLower();
     16   return string16(unicode_string.getBuffer(), unicode_string.length());
     17 }
     18 
     19 string16 ToUpper(const StringPiece16& string) {
     20   icu::UnicodeString unicode_string(string.data(), string.size());
     21   unicode_string.toUpper();
     22   return string16(unicode_string.getBuffer(), unicode_string.length());
     23 }
     24 
     25 }  // namespace i18n
     26 }  // namespace base
     27