/src/icu/source/i18n/numparse_utils.h
Line  | Count  | Source (jump to first uncovered line)  | 
1  |  | // © 2018 and later: Unicode, Inc. and others.  | 
2  |  | // License & terms of use: http://www.unicode.org/copyright.html  | 
3  |  |  | 
4  |  | #include "unicode/utypes.h"  | 
5  |  |  | 
6  |  | #if !UCONFIG_NO_FORMATTING  | 
7  |  | #ifndef __NUMPARSE_UTILS_H__  | 
8  |  | #define __NUMPARSE_UTILS_H__  | 
9  |  |  | 
10  |  | #include "numparse_types.h"  | 
11  |  | #include "unicode/uniset.h"  | 
12  |  |  | 
13  |  | U_NAMESPACE_BEGIN namespace numparse { | 
14  |  | namespace impl { | 
15  |  | namespace utils { | 
16  |  |  | 
17  |  |  | 
18  | 0  | inline static void putLeadCodePoints(const UnicodeSet* input, UnicodeSet* output) { | 
19  | 0  |     for (int32_t i = 0; i < input->getRangeCount(); i++) { | 
20  | 0  |         output->add(input->getRangeStart(i), input->getRangeEnd(i));  | 
21  | 0  |     }  | 
22  | 0  |     // TODO: ANDY: How to iterate over the strings in ICU4C UnicodeSet?  | 
23  | 0  | } Unexecuted instantiation: numparse_symbols.cpp:icu_70::numparse::impl::utils::putLeadCodePoints(icu_70::UnicodeSet const*, icu_70::UnicodeSet*) Unexecuted instantiation: numparse_affixes.cpp:icu_70::numparse::impl::utils::putLeadCodePoints(icu_70::UnicodeSet const*, icu_70::UnicodeSet*) Unexecuted instantiation: numparse_currency.cpp:icu_70::numparse::impl::utils::putLeadCodePoints(icu_70::UnicodeSet const*, icu_70::UnicodeSet*) Unexecuted instantiation: numparse_decimal.cpp:icu_70::numparse::impl::utils::putLeadCodePoints(icu_70::UnicodeSet const*, icu_70::UnicodeSet*)  | 
24  |  |  | 
25  | 0  | inline static void putLeadCodePoint(const UnicodeString& input, UnicodeSet* output) { | 
26  | 0  |     if (!input.isEmpty()) { | 
27  | 0  |         output->add(input.char32At(0));  | 
28  | 0  |     }  | 
29  | 0  | } Unexecuted instantiation: numparse_symbols.cpp:icu_70::numparse::impl::utils::putLeadCodePoint(icu_70::UnicodeString const&, icu_70::UnicodeSet*) Unexecuted instantiation: numparse_affixes.cpp:icu_70::numparse::impl::utils::putLeadCodePoint(icu_70::UnicodeString const&, icu_70::UnicodeSet*) Unexecuted instantiation: numparse_currency.cpp:icu_70::numparse::impl::utils::putLeadCodePoint(icu_70::UnicodeString const&, icu_70::UnicodeSet*) Unexecuted instantiation: numparse_decimal.cpp:icu_70::numparse::impl::utils::putLeadCodePoint(icu_70::UnicodeString const&, icu_70::UnicodeSet*)  | 
30  |  |  | 
31  | 0  | inline static void copyCurrencyCode(UChar* dest, const UChar* src) { | 
32  | 0  |     uprv_memcpy(dest, src, sizeof(UChar) * 3);  | 
33  | 0  |     dest[3] = 0;  | 
34  | 0  | } Unexecuted instantiation: numparse_symbols.cpp:icu_70::numparse::impl::utils::copyCurrencyCode(char16_t*, char16_t const*) Unexecuted instantiation: numparse_affixes.cpp:icu_70::numparse::impl::utils::copyCurrencyCode(char16_t*, char16_t const*) Unexecuted instantiation: numparse_currency.cpp:icu_70::numparse::impl::utils::copyCurrencyCode(char16_t*, char16_t const*) Unexecuted instantiation: numparse_decimal.cpp:icu_70::numparse::impl::utils::copyCurrencyCode(char16_t*, char16_t const*)  | 
35  |  |  | 
36  |  |  | 
37  |  | } // namespace utils  | 
38  |  | } // namespace impl  | 
39  |  | } // namespace numparse  | 
40  |  | U_NAMESPACE_END  | 
41  |  |  | 
42  |  | #endif //__NUMPARSE_UTILS_H__  | 
43  |  | #endif /* #if !UCONFIG_NO_FORMATTING */  |