CARVIEW |
Select Language
HTTP/2 200
server: GitHub.com
content-type: text/html; charset=utf-8
last-modified: Thu, 13 Mar 2025 20:00:10 GMT
access-control-allow-origin: *
etag: W/"67d3394a-27eb"
expires: Sat, 19 Jul 2025 01:36:01 GMT
cache-control: max-age=600
content-encoding: gzip
x-proxy-cache: MISS
x-github-request-id: 1957:121B70:2B382A:2C058B:687AF426
accept-ranges: bytes
age: 0
date: Sat, 19 Jul 2025 01:26:01 GMT
via: 1.1 varnish
x-served-by: cache-bom4724-BOM
x-cache: MISS
x-cache-hits: 0
x-timer: S1752888362.625332,VS0,VE316
vary: Accept-Encoding
x-fastly-request-id: d8dc70e498db08bb4daa8bbacbacaba84f82b9d7
content-length: 2751
ICU 77.1: i18n/unicode/numberrangeformatter.h File Reference
Generated by
1.9.1
numberrangeformatter.h File Reference
C++ API: Library for localized formatting of number, currency, and unit ranges. More...
#include "unicode/utypes.h"
#include <atomic>
#include "unicode/appendable.h"
#include "unicode/fieldpos.h"
#include "unicode/formattedvalue.h"
#include "unicode/fpositer.h"
#include "unicode/numberformatter.h"
#include "unicode/unumberrangeformatter.h"
Go to the source code of this file.
Data Structures | |
struct | icu::number::impl::RangeMacroProps |
class | icu::number::NumberRangeFormatterSettings< Derived > |
An abstract base class for specifying settings related to number formatting. More... | |
class | icu::number::UnlocalizedNumberRangeFormatter |
A NumberRangeFormatter that does not yet have a locale. More... | |
class | icu::number::LocalizedNumberRangeFormatter |
A NumberRangeFormatter that has a locale associated with it; this means .formatRange() methods are available. More... | |
class | icu::number::FormattedNumberRange |
The result of a number range formatting operation. More... | |
class | icu::number::NumberRangeFormatter |
See the main description in numberrangeformatter.h for documentation and examples. More... | |
Namespaces | |
icu | |
File coll.h. | |
Detailed Description
C++ API: Library for localized formatting of number, currency, and unit ranges.
The main entrypoint to the formatting of ranges of numbers, including currencies and other units of measurement.
Usage example:
NumberRangeFormatter::with() .identityFallback(UNUM_IDENTITY_FALLBACK_APPROXIMATELY_OR_SINGLE_VALUE) .numberFormatterFirst(NumberFormatter::with().adoptUnit(MeasureUnit::createMeter())) .numberFormatterSecond(NumberFormatter::with().adoptUnit(MeasureUnit::createKilometer())) .locale("en-GB") .formatFormattableRange(750, 1.2, status) .toString(status); // => "750 m - 1.2 km"
<p<blockquote>
Like NumberFormatter, NumberRangeFormatter instances (i.e., LocalizedNumberRangeFormatter and UnlocalizedNumberRangeFormatter) are immutable and thread-safe. This API is based on the fluent design pattern popularized by libraries such as Google's Guava.
- Author
- Shane Carr
Definition in file numberrangeformatter.h.
Generated by