ICU 74.1 74.1

Data Structures | Namespaces | Typedefs | Enumerations
measfmt.h File Reference

C++ API: Compatibility APIs for measure formatting. More...

`#include "unicode/utypes.h"`
`#include "unicode/format.h"`
`#include "unicode/udat.h"`

Go to the source code of this file.

## Data Structures
class | icu::MeasureFormat

## Namespaces
| icu
| File coll.h.

## Typedefs
typedef enum UMeasureFormatWidth | UMeasureFormatWidth

## Enumerations
enum | UMeasureFormatWidth { UMEASFMT_WIDTH_WIDE , UMEASFMT_WIDTH_SHORT , UMEASFMT_WIDTH_NARROW , UMEASFMT_WIDTH_NUMERIC , UMEASFMT_WIDTH_COUNT = 4 }
| Constants for various widths. More...

## Detailed Description

C++ API: Compatibility APIs for measure formatting.

Definition in file measfmt.h.

## Typedef Documentation

## ◆ UMeasureFormatWidth

typedef enum UMeasureFormatWidth UMeasureFormatWidth

Stable:
  ICU 53

Definition at line 1 of file measfmt.h.

## Enumeration Type Documentation

## ◆ UMeasureFormatWidth

enum UMeasureFormatWidth

Constants for various widths.

There are 4 widths: Wide, Short, Narrow, Numeric. For example, for English, when formatting "3 hours" Wide is "3 hours"; short is "3 hrs"; narrow is "3h"; formatting "3 hours 17 minutes" as numeric give "3:17"

Stable:
  ICU 53

Enumerator
UMEASFMT_WIDTH_WIDE | Spell out measure units. Stable: ICU 53
UMEASFMT_WIDTH_SHORT | Abbreviate measure units. Stable: ICU 53
UMEASFMT_WIDTH_NARROW | Use symbols for measure units when possible. Stable: ICU 53
UMEASFMT_WIDTH_NUMERIC | Completely omit measure units when possible. For example, format '5 hours, 37 minutes' as '5:37' Stable: ICU 53
UMEASFMT_WIDTH_COUNT | One more than the highest normal UMeasureFormatWidth value. Deprecated: ICU 58 The numeric value may change over time, see ICU ticket #12420.

Definition at line 38 of file measfmt.h.