#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;
class U_I18N_API DigitAffix : public UMemory {
public:
DigitAffix();
DigitAffix(
const UChar *value,
int32_t charCount,
int32_t fieldId=UNUM_FIELD_COUNT);
void remove();
void appendUChar(UChar value, int32_t fieldId=UNUM_FIELD_COUNT);
void append(const UnicodeString &value, int32_t fieldId=UNUM_FIELD_COUNT);
void setTo(const UnicodeString &value, int32_t fieldId=UNUM_FIELD_COUNT);
void append(const UChar *value, int32_t charCount, int32_t fieldId=UNUM_FIELD_COUNT);
UnicodeString &format(
FieldPositionHandler &handler, UnicodeString &appendTo) const;
int32_t countChar32() const { return fAffix.countChar32(); }
const UnicodeString & toString() const { return fAffix; }
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__