An immutable class containing the result of a date interval formatting operation. More...
#include <dtitvfmt.h>
An immutable class containing the result of a date interval formatting operation.
Instances of this class are immutable and thread-safe.
When calling nextPosition(): The fields are returned from left to right. The special field category UFIELD_CATEGORY_DATE_INTERVAL_SPAN is used to indicate which datetime primitives came from which arguments: 0 means fromCalendar, and 1 means toCalendar. The span category will always occur before the corresponding fields in UFIELD_CATEGORY_DATE in the nextPosition() iterator.
Not intended for public subclassing.
Definition at line 59 of file dtitvfmt.h.
◆ FormattedDateInterval() [1/2] icu::FormattedDateInterval::FormattedDateInterval ( ) inline ◆ FormattedDateInterval() [2/2] ◆ ~FormattedDateInterval() virtual icu::FormattedDateInterval::~FormattedDateInterval ( ) overridevirtual ◆ appendTo() ◆ nextPosition()Iterates over field positions in the FormattedValue.
This lets you determine the position of specific types of substrings, like a month or a decimal separator.
To loop over all field positions:
ConstrainedFieldPosition cfpos; while (fmtval.nextPosition(cfpos, status)) { // handle the field position; get information from cfpos }
Implements icu::FormattedValue.
◆ operator=() ◆ toString() ◆ toTempString()Returns the formatted string as a read-only alias to memory owned by the FormattedValue.
The return value is valid only as long as this FormattedValue is present and unchanged in memory. If you need the string outside the current scope, consider toString.
The buffer returned by calling UnicodeString::getBuffer() on the return value is guaranteed to be NUL-terminated.
Implements icu::FormattedValue.
The documentation for this class was generated from the following file:
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