Namespaces

Enumerations

enum UMeasureUnitComplexity
Name Value Comments
UMEASURE_UNIT_SINGLE 0

A single unit, like kilojoule.

ICU 67

UMEASURE_UNIT_COMPOUND 1

A compound unit, like meter-per-second.

ICU 67

UMEASURE_UNIT_MIXED 2

A mixed unit, like hour+minute.

ICU 67

Enumeration for unit complexity. There are three levels:

- SINGLE: A single unit, optionally with a power and/or SI or binary prefix.

Examples: hectare, square-kilometer, kilojoule, per-second, mebibyte.

- COMPOUND: A unit composed of the product of multiple single units. Examples:

meter-per-second, kilowatt-hour, kilogram-meter-per-square-second.

- MIXED: A unit composed of the sum of multiple single units. Examples: foot+inch,

hour+minute+second, degree+arcminute+arcsecond.

The complexity determines which operations are available. For example, you cannot set the power

or prefix of a compound unit.

ICU 67

Defined at line 55 of file ../../third_party/icu/default/source/i18n/unicode/measunit.h

enum UMeasurePrefix
Name Value Comments
UMEASURE_PREFIX_ONE 30 + 0

The absence of an SI or binary prefix.

The integer representation of this enum value is an arbitrary
implementation detail and should not be relied upon: use
umeas_getPrefixPower() to obtain meaningful values.

ICU 69

UMEASURE_PREFIX_YOTTA UMEASURE_PREFIX_ONE + 24

SI prefix: yotta, 10^24.

ICU 69

UMEASURE_PREFIX_RONNA UMEASURE_PREFIX_ONE + 27

SI prefix: ronna, 10^27.

ICU 75

UMEASURE_PREFIX_QUETTA UMEASURE_PREFIX_ONE + 30

SI prefix: quetta, 10^30.

ICU 75

UMEASURE_PREFIX_INTERNAL_MAX_SI UMEASURE_PREFIX_QUETTA --
UMEASURE_PREFIX_ZETTA UMEASURE_PREFIX_ONE + 21

SI prefix: zetta, 10^21.

ICU 69

UMEASURE_PREFIX_EXA UMEASURE_PREFIX_ONE + 18

SI prefix: exa, 10^18.

ICU 69

UMEASURE_PREFIX_PETA UMEASURE_PREFIX_ONE + 15

SI prefix: peta, 10^15.

ICU 69

UMEASURE_PREFIX_TERA UMEASURE_PREFIX_ONE + 12

SI prefix: tera, 10^12.

ICU 69

UMEASURE_PREFIX_GIGA UMEASURE_PREFIX_ONE + 9

SI prefix: giga, 10^9.

ICU 69

UMEASURE_PREFIX_MEGA UMEASURE_PREFIX_ONE + 6

SI prefix: mega, 10^6.

ICU 69

UMEASURE_PREFIX_KILO UMEASURE_PREFIX_ONE + 3

SI prefix: kilo, 10^3.

ICU 69

UMEASURE_PREFIX_HECTO UMEASURE_PREFIX_ONE + 2

SI prefix: hecto, 10^2.

ICU 69

UMEASURE_PREFIX_DEKA UMEASURE_PREFIX_ONE + 1

SI prefix: deka, 10^1.

ICU 69

UMEASURE_PREFIX_DECI UMEASURE_PREFIX_ONE + -1

SI prefix: deci, 10^-1.

ICU 69

UMEASURE_PREFIX_CENTI UMEASURE_PREFIX_ONE + -2

SI prefix: centi, 10^-2.

ICU 69

UMEASURE_PREFIX_MILLI UMEASURE_PREFIX_ONE + -3

SI prefix: milli, 10^-3.

ICU 69

UMEASURE_PREFIX_MICRO UMEASURE_PREFIX_ONE + -6

SI prefix: micro, 10^-6.

ICU 69

UMEASURE_PREFIX_NANO UMEASURE_PREFIX_ONE + -9

SI prefix: nano, 10^-9.

ICU 69

UMEASURE_PREFIX_PICO UMEASURE_PREFIX_ONE + -12

SI prefix: pico, 10^-12.

ICU 69

UMEASURE_PREFIX_FEMTO UMEASURE_PREFIX_ONE + -15

SI prefix: femto, 10^-15.

ICU 69

UMEASURE_PREFIX_ATTO UMEASURE_PREFIX_ONE + -18

SI prefix: atto, 10^-18.

ICU 69

UMEASURE_PREFIX_ZEPTO UMEASURE_PREFIX_ONE + -21

SI prefix: zepto, 10^-21.

ICU 69

UMEASURE_PREFIX_YOCTO UMEASURE_PREFIX_ONE + -24

SI prefix: yocto, 10^-24.

ICU 69

UMEASURE_PREFIX_RONTO UMEASURE_PREFIX_ONE + -27

SI prefix: ronto, 10^-27.

ICU 75

UMEASURE_PREFIX_QUECTO UMEASURE_PREFIX_ONE + -30

SI prefix: quecto, 10^-30.

ICU 75

UMEASURE_PREFIX_INTERNAL_MIN_SI UMEASURE_PREFIX_QUECTO --
UMEASURE_PREFIX_INTERNAL_ONE_BIN -60

Cannot conditionalize the following with #ifndef U_HIDE_INTERNAL_API,
used in definitions of non-internal enum values

ICU use only.
Sets the arbitrary offset of the base-1024 binary prefixes' enum values.

UMEASURE_PREFIX_KIBI UMEASURE_PREFIX_INTERNAL_ONE_BIN + 1

Binary prefix: kibi, 1024^1.

ICU 69

UMEASURE_PREFIX_INTERNAL_MIN_BIN UMEASURE_PREFIX_KIBI

ICU use only.
Used to determine the set of base-1024 binary prefixes.

UMEASURE_PREFIX_MEBI UMEASURE_PREFIX_INTERNAL_ONE_BIN + 2

Binary prefix: mebi, 1024^2.

ICU 69

UMEASURE_PREFIX_GIBI UMEASURE_PREFIX_INTERNAL_ONE_BIN + 3

Binary prefix: gibi, 1024^3.

ICU 69

UMEASURE_PREFIX_TEBI UMEASURE_PREFIX_INTERNAL_ONE_BIN + 4

Binary prefix: tebi, 1024^4.

ICU 69

UMEASURE_PREFIX_PEBI UMEASURE_PREFIX_INTERNAL_ONE_BIN + 5

Binary prefix: pebi, 1024^5.

ICU 69

UMEASURE_PREFIX_EXBI UMEASURE_PREFIX_INTERNAL_ONE_BIN + 6

Binary prefix: exbi, 1024^6.

ICU 69

UMEASURE_PREFIX_ZEBI UMEASURE_PREFIX_INTERNAL_ONE_BIN + 7

Binary prefix: zebi, 1024^7.

ICU 69

UMEASURE_PREFIX_YOBI UMEASURE_PREFIX_INTERNAL_ONE_BIN + 8

Binary prefix: yobi, 1024^8.

ICU 69

UMEASURE_PREFIX_INTERNAL_MAX_BIN UMEASURE_PREFIX_YOBI

ICU use only.
Used to determine the set of base-1024 binary prefixes.

Enumeration for SI and binary prefixes, e.g. "kilo-", "nano-", "mebi-".

Enum values should be treated as opaque: use umeas_getPrefixPower() and

umeas_getPrefixBase() to find their corresponding values.

ICU 69

Defined at line 89 of file ../../third_party/icu/default/source/i18n/unicode/measunit.h

Records

Functions

  • void locale_available_init ()
  • UBool operator== (const StringPiece & x, const StringPiece & y)

    Global operator == for StringPiece

    Parameters

    x The first StringPiece to compare.
    y The second StringPiece to compare.

    Returns

    true if the string data is equal

    ICU 4.8

  • Locale * locale_set_default_internal (const char * , UErrorCode & status)

    A friend to allow the default locale to be set by either the C or C++ API.

  • template <typename T, typename = std::enable_if_t<std::is_same_v<T, UChar>>>
    const char16_t * uprv_char16PtrFromUChar (const T * p)

    Defined at line 272 of file ../../third_party/icu/default/source/common/unicode/char16ptr.h

  • const UChar * toUCharPtr (const char16_t * p)

    Converts from const char16_t * to const UChar *.

    Includes an aliasing barrier if available.

    Parameters

    p pointer

    Returns

    p as const UChar *

    ICU 59

    Defined at line 321 of file ../../third_party/icu/default/source/common/unicode/char16ptr.h

  • UChar * toUCharPtr (char16_t * p)

    Converts from char16_t * to UChar *.

    Includes an aliasing barrier if available.

    Parameters

    p pointer

    Returns

    p as UChar *

    ICU 59

    Defined at line 335 of file ../../third_party/icu/default/source/common/unicode/char16ptr.h

  • bool operator!= (const StringPiece & x, const StringPiece & y)

    Global operator != for StringPiece

    Parameters

    x The first StringPiece to compare.
    y The second StringPiece to compare.

    Returns

    true if the string data is not equal

    ICU 4.8

    Defined at line 346 of file ../../third_party/icu/default/source/common/unicode/stringpiece.h

  • UnicodeString operator+ (const UnicodeString & s1, const UnicodeString & s2)

    Creates a new UnicodeString from the concatenation of two others.

    Parameters

    s1 The first string to be copied to the new one.
    s2 The second string to be copied to the new one, after s1.

    Returns

    UnicodeString(s1).append(s2)

    ICU 2.8

  • void swap (LocalPointer<T> & p1, LocalPointer<T> & p2)

    Non-member LocalPointer swap function.

    Parameters

    p1 will get p2's pointer
    p2 will get p1's pointerICU 56

    Defined at line 289 of file ../../third_party/icu/default/source/common/unicode/localpointer.h

  • const OldUChar * toOldUCharPtr (const char16_t * p)

    Converts from const char16_t * to const OldUChar *.

    Includes an aliasing barrier if available.

    Parameters

    p pointer

    Returns

    p as const OldUChar *

    ICU 59

    Defined at line 349 of file ../../third_party/icu/default/source/common/unicode/char16ptr.h

  • OldUChar * toOldUCharPtr (char16_t * p)

    Converts from char16_t * to OldUChar *.

    Includes an aliasing barrier if available.

    Parameters

    p pointer

    Returns

    p as OldUChar *

    ICU 59

    Defined at line 363 of file ../../third_party/icu/default/source/common/unicode/char16ptr.h

  • void swap (LocalArray<T> & p1, LocalArray<T> & p2)

    Non-member LocalArray swap function.

    Parameters

    p1 will get p2's pointer
    p2 will get p1's pointerICU 56

    Defined at line 464 of file ../../third_party/icu/default/source/common/unicode/localpointer.h

  • void swap (UnicodeString & s1, UnicodeString & s2)

    Non-member UnicodeString swap function.

    Parameters

    s1 will get s2's contents and state
    s2 will get s1's contents and stateICU 56

    Defined at line 2050 of file ../../third_party/icu/default/source/common/unicode/unistr.h

  • template <typename US, typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S> && std::is_same_v<US, UnicodeString>>>
    UnicodeString operator+ (const US & s1, const S & s2)

    Creates a new UnicodeString from the concatenation of a UnicodeString and `s2`

    which is, or which is implicitly convertible to,

    a std::u16string_view or (if U_SIZEOF_WCHAR_T==2) std::wstring_view.

    Parameters

    s1 The string to be copied to the new one.
    s2 The string view to be copied to the new string, after s1.

    Returns

    UnicodeString(s1).append(s2)

    ICU 76

    Defined at line 4179 of file ../../third_party/icu/default/source/common/unicode/unistr.h

  • int32_t umeas_getPrefixBase_78 (UMeasurePrefix unitPrefix)

    Returns the base of the factor associated with the given unit prefix: the

    base is 10 for SI prefixes (kilo, micro) and 1024 for binary prefixes (kibi,

    mebi).

    ICU 69

  • int32_t umeas_getPrefixPower_78 (UMeasurePrefix unitPrefix)

    Returns the exponent of the factor associated with the given unit prefix, for

    example 3 for kilo, -6 for micro, 1 for kibi, 2 for mebi, 3 for gibi.

    ICU 69

  • UnicodeString unistr_internalConcat (const UnicodeString & s1, std::u16string_view s2)
  • UnicodeString ures_getUnicodeString (const UResourceBundle * resB, UErrorCode * status)

    Returns the string value from a string resource bundle.

    Parameters

    resB a resource, should have type URES_STRING
    status: fills in the outgoing error codecould be<TT>U_MISSING_RESOURCE_ERROR</TT> if the key is not foundcould be a non-failing errore.g.:<TT>U_USING_FALLBACK_WARNING</TT>,<TT>U_USING_DEFAULT_WARNING</TT>

    Returns

    The string value, or a bogus string if there is a failure UErrorCode.

    ICU 2.0

    Defined at line 812 of file ../../third_party/icu/default/source/common/unicode/ures.h

  • UnicodeString ures_getNextUnicodeString (UResourceBundle * resB, const char ** key, UErrorCode * status)

    Returns the next string in a resource, or an empty string if there are no more resources

    to iterate over.

    Use ures_getNextString() instead to distinguish between

    the end of the iteration and a real empty string value.

    Parameters

    resB a resource
    key fill in for key associated with this string
    status fills in the outgoing error code

    Returns

    The string value, or a bogus string if there is a failure UErrorCode.

    ICU 2.0

    Defined at line 837 of file ../../third_party/icu/default/source/common/unicode/ures.h

  • UnicodeString ures_getUnicodeStringByIndex (const UResourceBundle * resB, int32_t indexS, UErrorCode * status)

    Returns the string in a given resource array or table at the specified index.

    Parameters

    resB a resource
    indexS an index to the wanted string.
    status fills in the outgoing error code

    Returns

    The string value, or a bogus string if there is a failure UErrorCode.

    ICU 2.0

    Defined at line 859 of file ../../third_party/icu/default/source/common/unicode/ures.h

  • UnicodeString ures_getUnicodeStringByKey (const UResourceBundle * resB, const char * key, UErrorCode * status)

    Returns a string in a resource that has a given key.

    This procedure works only with table resources.

    Parameters

    resB a resource
    key a key associated with the wanted string
    status fills in the outgoing error code

    Returns

    The string value, or a bogus string if there is a failure UErrorCode.

    ICU 2.0

    Defined at line 882 of file ../../third_party/icu/default/source/common/unicode/ures.h

Variables

const bool ConvertibleToU16StringView

Defined at line 384 of file ../../third_party/icu/default/source/common/unicode/char16ptr.h

const bool ConvertibleToU16StringView

Defined at line 384 of file ../../third_party/icu/default/source/common/unicode/char16ptr.h

const bool ConvertibleToU16StringView

Defined at line 384 of file ../../third_party/icu/default/source/common/unicode/char16ptr.h

const bool ConvertibleToU16StringView

Defined at line 384 of file ../../third_party/icu/default/source/common/unicode/char16ptr.h

const bool ConvertibleToU16StringView

Defined at line 384 of file ../../third_party/icu/default/source/common/unicode/char16ptr.h

const bool ConvertibleToU16StringView

Defined at line 384 of file ../../third_party/icu/default/source/common/unicode/char16ptr.h

const bool ConvertibleToU16StringView

Defined at line 384 of file ../../third_party/icu/default/source/common/unicode/char16ptr.h

const bool ConvertibleToU16StringView

Defined at line 384 of file ../../third_party/icu/default/source/common/unicode/char16ptr.h

const bool ConvertibleToU16StringView

Defined at line 384 of file ../../third_party/icu/default/source/common/unicode/char16ptr.h

const bool ConvertibleToU16StringView

Defined at line 384 of file ../../third_party/icu/default/source/common/unicode/char16ptr.h

const bool ConvertibleToU16StringView

Defined at line 384 of file ../../third_party/icu/default/source/common/unicode/char16ptr.h

const bool ConvertibleToU16StringView

Defined at line 384 of file ../../third_party/icu/default/source/common/unicode/char16ptr.h

const bool ConvertibleToU16StringView

Defined at line 384 of file ../../third_party/icu/default/source/common/unicode/char16ptr.h

const bool ConvertibleToU16StringView

Defined at line 384 of file ../../third_party/icu/default/source/common/unicode/char16ptr.h

const bool ConvertibleToU16StringView

Defined at line 384 of file ../../third_party/icu/default/source/common/unicode/char16ptr.h

const bool ConvertibleToU16StringView

Defined at line 385 of file ../../third_party/icu/default/source/common/unicode/char16ptr.h