/src/icu/source/common/unistr_case_locale.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | // © 2016 and later: Unicode, Inc. and others. |
2 | | // License & terms of use: http://www.unicode.org/copyright.html |
3 | | /* |
4 | | ******************************************************************************* |
5 | | * Copyright (C) 2011, International Business Machines |
6 | | * Corporation and others. All Rights Reserved. |
7 | | ******************************************************************************* |
8 | | * file name: unistr_case_locale.cpp |
9 | | * encoding: UTF-8 |
10 | | * tab size: 8 (not used) |
11 | | * indentation:4 |
12 | | * |
13 | | * created on: 2011may31 |
14 | | * created by: Markus W. Scherer |
15 | | * |
16 | | * Locale-sensitive case mapping functions (ones that call uloc_getDefault()) |
17 | | * were moved here to break dependency cycles among parts of the common library. |
18 | | */ |
19 | | |
20 | | #include "unicode/utypes.h" |
21 | | #include "unicode/locid.h" |
22 | | #include "unicode/ucasemap.h" |
23 | | #include "unicode/unistr.h" |
24 | | #include "ucasemap_imp.h" |
25 | | |
26 | | U_NAMESPACE_BEGIN |
27 | | |
28 | | //======================================== |
29 | | // Write implementation |
30 | | //======================================== |
31 | | |
32 | | UnicodeString & |
33 | 0 | UnicodeString::toLower() { |
34 | 0 | return caseMap(ustrcase_getCaseLocale(NULL), 0, |
35 | 0 | UCASEMAP_BREAK_ITERATOR_NULL ustrcase_internalToLower); |
36 | 0 | } |
37 | | |
38 | | UnicodeString & |
39 | 0 | UnicodeString::toLower(const Locale &locale) { |
40 | 0 | return caseMap(ustrcase_getCaseLocale(locale.getBaseName()), 0, |
41 | 0 | UCASEMAP_BREAK_ITERATOR_NULL ustrcase_internalToLower); |
42 | 0 | } |
43 | | |
44 | | UnicodeString & |
45 | 0 | UnicodeString::toUpper() { |
46 | 0 | return caseMap(ustrcase_getCaseLocale(NULL), 0, |
47 | 0 | UCASEMAP_BREAK_ITERATOR_NULL ustrcase_internalToUpper); |
48 | 0 | } |
49 | | |
50 | | UnicodeString & |
51 | 0 | UnicodeString::toUpper(const Locale &locale) { |
52 | 0 | return caseMap(ustrcase_getCaseLocale(locale.getBaseName()), 0, |
53 | 0 | UCASEMAP_BREAK_ITERATOR_NULL ustrcase_internalToUpper); |
54 | 0 | } |
55 | | |
56 | | U_NAMESPACE_END |