annotate modules/javafx.web/src/main/native/Source/ThirdParty/icu/source/i18n/numparse_utils.h @ 11038:20a8447c71c6

8207159: Update ICU to version 62.1 Reviewed-by: mbilla, kcr, ghb
author arajkumar
date Fri, 24 Aug 2018 15:06:40 +0530
parents
children
rev   line source
arajkumar@11038 1 // © 2018 and later: Unicode, Inc. and others.
arajkumar@11038 2 // License & terms of use: http://www.unicode.org/copyright.html
arajkumar@11038 3
arajkumar@11038 4 #include "unicode/utypes.h"
arajkumar@11038 5
arajkumar@11038 6 #if !UCONFIG_NO_FORMATTING
arajkumar@11038 7 #ifndef __NUMPARSE_UTILS_H__
arajkumar@11038 8 #define __NUMPARSE_UTILS_H__
arajkumar@11038 9
arajkumar@11038 10 #include "numparse_types.h"
arajkumar@11038 11 #include "unicode/uniset.h"
arajkumar@11038 12
arajkumar@11038 13 U_NAMESPACE_BEGIN namespace numparse {
arajkumar@11038 14 namespace impl {
arajkumar@11038 15 namespace utils {
arajkumar@11038 16
arajkumar@11038 17
arajkumar@11038 18 inline static void putLeadCodePoints(const UnicodeSet* input, UnicodeSet* output) {
arajkumar@11038 19 for (int32_t i = 0; i < input->getRangeCount(); i++) {
arajkumar@11038 20 output->add(input->getRangeStart(i), input->getRangeEnd(i));
arajkumar@11038 21 }
arajkumar@11038 22 // TODO: ANDY: How to iterate over the strings in ICU4C UnicodeSet?
arajkumar@11038 23 }
arajkumar@11038 24
arajkumar@11038 25 inline static void putLeadCodePoint(const UnicodeString& input, UnicodeSet* output) {
arajkumar@11038 26 if (!input.isEmpty()) {
arajkumar@11038 27 output->add(input.char32At(0));
arajkumar@11038 28 }
arajkumar@11038 29 }
arajkumar@11038 30
arajkumar@11038 31 inline static void copyCurrencyCode(UChar* dest, const UChar* src) {
arajkumar@11038 32 uprv_memcpy(dest, src, sizeof(UChar) * 3);
arajkumar@11038 33 dest[3] = 0;
arajkumar@11038 34 }
arajkumar@11038 35
arajkumar@11038 36
arajkumar@11038 37 } // namespace utils
arajkumar@11038 38 } // namespace impl
arajkumar@11038 39 } // namespace numparse
arajkumar@11038 40 U_NAMESPACE_END
arajkumar@11038 41
arajkumar@11038 42 #endif //__NUMPARSE_UTILS_H__
arajkumar@11038 43 #endif /* #if !UCONFIG_NO_FORMATTING */