FieldPositionHandler;
36 classFormattedListData;
43 structListFormatInternal;
50 structListFormatData :
publicUMemory {
51UnicodeString twoPattern;
52UnicodeString startPattern;
53UnicodeString middlePattern;
54UnicodeString endPattern;
57ListFormatData(
constUnicodeString& two,
constUnicodeString& start,
constUnicodeString& middle,
constUnicodeString& end,
59twoPattern(two), startPattern(start), middlePattern(middle), endPattern(end), locale(loc) {}
131FormattedListData *fData;
136: fData(nullptr), fErrorCode(errorCode) {}
137 friend classListFormatter;
238 #ifndef U_HIDE_INTERNAL_API 269 static voidinitializeHash(
UErrorCode& errorCode);
270 static constListFormatInternal* getListFormatInternal(
const Locale& locale,
const char*style,
UErrorCode& errorCode);
272 staticListFormatInternal* loadListFormatInternal(
const Locale& locale,
const char* style,
UErrorCode& errorCode);
276ListFormatInternal* owned;
277 constListFormatInternal* data;
Base class for objects to which Unicode characters and strings can be appended.
Represents a span of a string containing a given field.
An immutable class containing the result of a list formatting operation.
FormattedList(const FormattedList &)=delete
Copying not supported; use move constructor instead.
FormattedList(FormattedList &&src) noexcept
Move constructor: Leaves the source FormattedList in an undefined state.
UnicodeString toTempString(UErrorCode &status) const override
Returns the formatted string as a read-only alias to memory owned by the FormattedValue.
UnicodeString toString(UErrorCode &status) const override
Returns the formatted string as a self-contained UnicodeString.
FormattedList()
Default constructor; makes an empty FormattedList.
UBool nextPosition(ConstrainedFieldPosition &cfpos, UErrorCode &status) const override
Iterates over field positions in the FormattedValue.
FormattedList & operator=(const FormattedList &)=delete
Copying not supported; use move assignment instead.
Appendable & appendTo(Appendable &appendable, UErrorCode &status) const override
Appends the formatted string to an Appendable.
virtual ~FormattedList() override
Destruct an instance of FormattedList.
FormattedList & operator=(FormattedList &&src) noexcept
Move assignment: Leaves the source FormattedList in an undefined state.
An abstract formatted value: a string with associated field attributes.
An immutable class for formatting a list, using data from CLDR (or supplied separately).
static ListFormatter * createInstance(UErrorCode &errorCode)
Creates a ListFormatter appropriate for the default locale.
static ListFormatter * createInstance(const Locale &locale, UErrorCode &errorCode)
Creates a ListFormatter appropriate for a locale.
ListFormatter(const ListFormatInternal *listFormatterInternal)
virtual ~ListFormatter()
Destructor.
static ListFormatter * createInstance(const Locale &locale, UListFormatterType type, UListFormatterWidth width, UErrorCode &errorCode)
Creates a ListFormatter for the given locale, list type, and style.
FormattedList formatStringsToValue(const UnicodeString items[], int32_t n_items, UErrorCode &errorCode) const
Formats a list of strings to a FormattedList, which exposes field position information.
ListFormatter(const ListFormatter &)
Copy constructor.
ListFormatter(const ListFormatData &data, UErrorCode &errorCode)
ListFormatter & operator=(const ListFormatter &other)
Assignment operator.
UnicodeString & format(const UnicodeString items[], int32_t n_items, UnicodeString &appendTo, int32_t index, int32_t &offset, UErrorCode &errorCode) const
UnicodeString & format(const UnicodeString items[], int32_t n_items, UnicodeString &appendTo, UErrorCode &errorCode) const
Formats a list of strings.
A Locale object represents a specific geographical, political, or cultural region.
UMemory is the common ICU base class.
UObject is the common ICU "boilerplate" class.
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
C++ API: Abstract operations for localized strings.
C++ API: Locale ID object.
#define U_HIDDEN
This is used to mark internal structs declared within external classes, to prevent the internal struc...
C API: Format a list in a locale-appropriate way.
UListFormatterWidth
Verbosity level of the list patterns.
UListFormatterType
Type of meaning expressed by the list.
int8_t UBool
The ICU boolean type, a signed-byte integer.
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
@ U_INVALID_STATE_ERROR
Requested operation can not be completed with ICU in its current state.
@ U_ZERO_ERROR
No error, no warning.
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4