diff options
author | Steven R. Loomis <srloomis@us.ibm.com> | 2016-04-08 19:03:16 -0700 |
---|---|---|
committer | Steven R. Loomis <srloomis@us.ibm.com> | 2016-05-04 16:02:45 -0700 |
commit | 2bbd1cd6004b3e1467e30d860385a85dad01fe24 (patch) | |
tree | b812046e89e46e0de09bc858e0b128787cbc0632 /deps/icu-small/source/i18n/digitaffix.h | |
parent | cd752e8463fad7c4805951d9ba47cd2f39691f2d (diff) | |
download | android-node-v8-2bbd1cd6004b3e1467e30d860385a85dad01fe24.tar.gz android-node-v8-2bbd1cd6004b3e1467e30d860385a85dad01fe24.tar.bz2 android-node-v8-2bbd1cd6004b3e1467e30d860385a85dad01fe24.zip |
deps: Intl: Check in "small-icu" 57.1
* this commit has "small" ICU 57.1.
See other related commit for tools to generate this commit.
Fixes: https://github.com/nodejs/node/issues/3476
PR-URL: https://github.com/nodejs/node/pull/6088
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'deps/icu-small/source/i18n/digitaffix.h')
-rw-r--r-- | deps/icu-small/source/i18n/digitaffix.h | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/deps/icu-small/source/i18n/digitaffix.h b/deps/icu-small/source/i18n/digitaffix.h new file mode 100644 index 0000000000..d5b545a3d7 --- /dev/null +++ b/deps/icu-small/source/i18n/digitaffix.h @@ -0,0 +1,102 @@ +/* +******************************************************************************* +* Copyright (C) 2015, International Business Machines +* Corporation and others. All Rights Reserved. +******************************************************************************* +* digitaffix.h +* +* created on: 2015jan06 +* created by: Travis Keep +*/ + +#ifndef __DIGITAFFIX_H__ +#define __DIGITAFFIX_H__ + +#include "unicode/uobject.h" + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/unistr.h" +#include "unicode/unum.h" +#include "unicode/utypes.h" + +U_NAMESPACE_BEGIN + +class FieldPositionHandler; + +/** + * A prefix or suffix of a formatted number. + */ +class U_I18N_API DigitAffix : public UMemory { +public: + + /** + * Creates an empty DigitAffix. + */ + DigitAffix(); + + /** + * Creates a DigitAffix containing given UChars where all of it has + * a field type of fieldId. + */ + DigitAffix( + const UChar *value, + int32_t charCount, + int32_t fieldId=UNUM_FIELD_COUNT); + + /** + * Makes this affix be the empty string. + */ + void remove(); + + /** + * Append value to this affix. If fieldId is present, the appended + * string is considered to be the type fieldId. + */ + void appendUChar(UChar value, int32_t fieldId=UNUM_FIELD_COUNT); + + /** + * Append value to this affix. If fieldId is present, the appended + * string is considered to be the type fieldId. + */ + void append(const UnicodeString &value, int32_t fieldId=UNUM_FIELD_COUNT); + + /** + * Sets this affix to given string. The entire string + * is considered to be the type fieldId. + */ + void setTo(const UnicodeString &value, int32_t fieldId=UNUM_FIELD_COUNT); + + /** + * Append value to this affix. If fieldId is present, the appended + * string is considered to be the type fieldId. + */ + void append(const UChar *value, int32_t charCount, int32_t fieldId=UNUM_FIELD_COUNT); + + /** + * Formats this affix. + */ + UnicodeString &format( + FieldPositionHandler &handler, UnicodeString &appendTo) const; + int32_t countChar32() const { return fAffix.countChar32(); } + + /** + * Returns this affix as a unicode string. + */ + const UnicodeString & toString() const { return fAffix; } + + /** + * Returns TRUE if this object equals rhs. + */ + UBool equals(const DigitAffix &rhs) const { + return ((fAffix == rhs.fAffix) && (fAnnotations == rhs.fAnnotations)); + } +private: + UnicodeString fAffix; + UnicodeString fAnnotations; +}; + + +U_NAMESPACE_END +#endif // #if !UCONFIG_NO_FORMATTING +#endif // __DIGITAFFIX_H__ |