/src/icu/icu4c/source/i18n/numparse_utils.h
Line | Count | Source |
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 |
14 | | namespace numparse::impl::utils { |
15 | | |
16 | 0 | inline static void putLeadCodePoints(const UnicodeSet* input, UnicodeSet* output) { |
17 | 0 | for (int32_t i = 0; i < input->getRangeCount(); i++) { |
18 | 0 | output->add(input->getRangeStart(i), input->getRangeEnd(i)); |
19 | 0 | } |
20 | 0 | // TODO: ANDY: How to iterate over the strings in ICU4C UnicodeSet? |
21 | 0 | } Unexecuted instantiation: numparse_symbols.cpp:icu_79::numparse::impl::utils::putLeadCodePoints(icu_79::UnicodeSet const*, icu_79::UnicodeSet*) Unexecuted instantiation: numparse_affixes.cpp:icu_79::numparse::impl::utils::putLeadCodePoints(icu_79::UnicodeSet const*, icu_79::UnicodeSet*) Unexecuted instantiation: numparse_currency.cpp:icu_79::numparse::impl::utils::putLeadCodePoints(icu_79::UnicodeSet const*, icu_79::UnicodeSet*) Unexecuted instantiation: numparse_decimal.cpp:icu_79::numparse::impl::utils::putLeadCodePoints(icu_79::UnicodeSet const*, icu_79::UnicodeSet*) |
22 | | |
23 | 0 | inline static void putLeadCodePoint(const UnicodeString& input, UnicodeSet* output) { |
24 | 0 | if (!input.isEmpty()) { |
25 | 0 | output->add(input.char32At(0)); |
26 | 0 | } |
27 | 0 | } Unexecuted instantiation: numparse_symbols.cpp:icu_79::numparse::impl::utils::putLeadCodePoint(icu_79::UnicodeString const&, icu_79::UnicodeSet*) Unexecuted instantiation: numparse_affixes.cpp:icu_79::numparse::impl::utils::putLeadCodePoint(icu_79::UnicodeString const&, icu_79::UnicodeSet*) Unexecuted instantiation: numparse_currency.cpp:icu_79::numparse::impl::utils::putLeadCodePoint(icu_79::UnicodeString const&, icu_79::UnicodeSet*) Unexecuted instantiation: numparse_decimal.cpp:icu_79::numparse::impl::utils::putLeadCodePoint(icu_79::UnicodeString const&, icu_79::UnicodeSet*) |
28 | | |
29 | 0 | inline static void copyCurrencyCode(char16_t* dest, const char16_t* src) { |
30 | 0 | uprv_memcpy(dest, src, sizeof(char16_t) * 3); |
31 | 0 | dest[3] = 0; |
32 | 0 | } Unexecuted instantiation: numparse_symbols.cpp:icu_79::numparse::impl::utils::copyCurrencyCode(char16_t*, char16_t const*) Unexecuted instantiation: numparse_affixes.cpp:icu_79::numparse::impl::utils::copyCurrencyCode(char16_t*, char16_t const*) Unexecuted instantiation: numparse_currency.cpp:icu_79::numparse::impl::utils::copyCurrencyCode(char16_t*, char16_t const*) Unexecuted instantiation: numparse_decimal.cpp:icu_79::numparse::impl::utils::copyCurrencyCode(char16_t*, char16_t const*) |
33 | | |
34 | | } // namespace numparse::impl::utils |
35 | | U_NAMESPACE_END |
36 | | |
37 | | #endif //__NUMPARSE_UTILS_H__ |
38 | | #endif /* #if !UCONFIG_NO_FORMATTING */ |