159d709d503bab6e2b61931737e662dd293b40578ccornelius/*
259d709d503bab6e2b61931737e662dd293b40578ccornelius*****************************************************************************************
3fceb39872958b9fa2505e63f8b8699a9e0f882f4ccornelius* Copyright (C) 2014, International Business Machines
459d709d503bab6e2b61931737e662dd293b40578ccornelius* Corporation and others. All Rights Reserved.
559d709d503bab6e2b61931737e662dd293b40578ccornelius*****************************************************************************************
659d709d503bab6e2b61931737e662dd293b40578ccornelius*/
759d709d503bab6e2b61931737e662dd293b40578ccornelius
859d709d503bab6e2b61931737e662dd293b40578ccornelius#ifndef UREGION_H
959d709d503bab6e2b61931737e662dd293b40578ccornelius#define UREGION_H
1059d709d503bab6e2b61931737e662dd293b40578ccornelius
1159d709d503bab6e2b61931737e662dd293b40578ccornelius#include "unicode/utypes.h"
1259d709d503bab6e2b61931737e662dd293b40578ccornelius#include "unicode/uenum.h"
1359d709d503bab6e2b61931737e662dd293b40578ccornelius
1459d709d503bab6e2b61931737e662dd293b40578ccornelius/**
1559d709d503bab6e2b61931737e662dd293b40578ccornelius * \file
1659d709d503bab6e2b61931737e662dd293b40578ccornelius * \brief C API: URegion (territory containment and mapping)
1759d709d503bab6e2b61931737e662dd293b40578ccornelius *
1859d709d503bab6e2b61931737e662dd293b40578ccornelius * URegion objects represent data associated with a particular Unicode Region Code, also known as a
1959d709d503bab6e2b61931737e662dd293b40578ccornelius * Unicode Region Subtag, which is defined based upon the BCP 47 standard. These include:
2059d709d503bab6e2b61931737e662dd293b40578ccornelius * * Two-letter codes defined by ISO 3166-1, with special LDML treatment of certain private-use or
2159d709d503bab6e2b61931737e662dd293b40578ccornelius *   reserved codes;
2259d709d503bab6e2b61931737e662dd293b40578ccornelius * * A subset of 3-digit numeric codes defined by UN M.49.
2359d709d503bab6e2b61931737e662dd293b40578ccornelius * URegion objects can also provide mappings to and from additional codes. There are different types
2459d709d503bab6e2b61931737e662dd293b40578ccornelius * of regions that are important to distinguish:
2559d709d503bab6e2b61931737e662dd293b40578ccornelius * <p>
2659d709d503bab6e2b61931737e662dd293b40578ccornelius * Macroregion - A code for a "macro geographical (continental) region, geographical sub-region, or
2759d709d503bab6e2b61931737e662dd293b40578ccornelius * selected economic and other grouping" as defined in UN M.49. These are typically 3-digit codes,
2859d709d503bab6e2b61931737e662dd293b40578ccornelius * but contain some 2-letter codes for LDML extensions, such as "QO" for Outlying Oceania.
2959d709d503bab6e2b61931737e662dd293b40578ccornelius * Macroregions are represented in ICU by one of three region types: WORLD (code 001),
3059d709d503bab6e2b61931737e662dd293b40578ccornelius * CONTINENTS (regions contained directly by WORLD), and SUBCONTINENTS (regions contained directly
3159d709d503bab6e2b61931737e662dd293b40578ccornelius * by a continent ).
3259d709d503bab6e2b61931737e662dd293b40578ccornelius * <p>
3359d709d503bab6e2b61931737e662dd293b40578ccornelius * TERRITORY - A Region that is not a Macroregion. These are typically codes for countries, but also
3459d709d503bab6e2b61931737e662dd293b40578ccornelius * include areas that are not separate countries, such as the code "AQ" for Antarctica or the code
3559d709d503bab6e2b61931737e662dd293b40578ccornelius * "HK" for Hong Kong (SAR China). Overseas dependencies of countries may or may not have separate
3659d709d503bab6e2b61931737e662dd293b40578ccornelius * codes. The codes are typically 2-letter codes aligned with ISO 3166, but BCP47 allows for the use
3759d709d503bab6e2b61931737e662dd293b40578ccornelius * of 3-digit codes in the future.
3859d709d503bab6e2b61931737e662dd293b40578ccornelius * <p>
3959d709d503bab6e2b61931737e662dd293b40578ccornelius * UNKNOWN - The code ZZ is defined by Unicode LDML for use in indicating that region is unknown,
4059d709d503bab6e2b61931737e662dd293b40578ccornelius * or that the value supplied as a region was invalid.
4159d709d503bab6e2b61931737e662dd293b40578ccornelius * <p>
4259d709d503bab6e2b61931737e662dd293b40578ccornelius * DEPRECATED - Region codes that have been defined in the past but are no longer in modern usage,
4359d709d503bab6e2b61931737e662dd293b40578ccornelius * usually due to a country splitting into multiple territories or changing its name.
4459d709d503bab6e2b61931737e662dd293b40578ccornelius * <p>
4559d709d503bab6e2b61931737e662dd293b40578ccornelius * GROUPING - A widely understood grouping of territories that has a well defined membership such
4659d709d503bab6e2b61931737e662dd293b40578ccornelius * that a region code has been assigned for it.  Some of these are UN M.49 codes that don't fall into
4759d709d503bab6e2b61931737e662dd293b40578ccornelius * the world/continent/sub-continent hierarchy, while others are just well-known groupings that have
4859d709d503bab6e2b61931737e662dd293b40578ccornelius * their own region code. Region "EU" (European Union) is one such region code that is a grouping.
4959d709d503bab6e2b61931737e662dd293b40578ccornelius * Groupings will never be returned by the uregion_getContainingRegion, since a different type of region
5059d709d503bab6e2b61931737e662dd293b40578ccornelius * (WORLD, CONTINENT, or SUBCONTINENT) will always be the containing region instead.
5159d709d503bab6e2b61931737e662dd293b40578ccornelius *
5259d709d503bab6e2b61931737e662dd293b40578ccornelius * URegion objects are const/immutable, owned and maintained by ICU itself, so there are not functions
5359d709d503bab6e2b61931737e662dd293b40578ccornelius * to open or close them.
5459d709d503bab6e2b61931737e662dd293b40578ccornelius */
5559d709d503bab6e2b61931737e662dd293b40578ccornelius
5659d709d503bab6e2b61931737e662dd293b40578ccornelius/**
5759d709d503bab6e2b61931737e662dd293b40578ccornelius * URegionType is an enumeration defining the different types of regions.  Current possible
5859d709d503bab6e2b61931737e662dd293b40578ccornelius * values are URGN_WORLD, URGN_CONTINENT, URGN_SUBCONTINENT, URGN_TERRITORY, URGN_GROUPING,
5959d709d503bab6e2b61931737e662dd293b40578ccornelius * URGN_DEPRECATED, and URGN_UNKNOWN.
6059d709d503bab6e2b61931737e662dd293b40578ccornelius *
61fceb39872958b9fa2505e63f8b8699a9e0f882f4ccornelius * @stable ICU 51
6259d709d503bab6e2b61931737e662dd293b40578ccornelius */
6359d709d503bab6e2b61931737e662dd293b40578ccorneliustypedef enum URegionType {
6459d709d503bab6e2b61931737e662dd293b40578ccornelius    /**
6559d709d503bab6e2b61931737e662dd293b40578ccornelius     * Type representing the unknown region.
66fceb39872958b9fa2505e63f8b8699a9e0f882f4ccornelius     * @stable ICU 51
6759d709d503bab6e2b61931737e662dd293b40578ccornelius     */
6859d709d503bab6e2b61931737e662dd293b40578ccornelius    URGN_UNKNOWN,
6959d709d503bab6e2b61931737e662dd293b40578ccornelius
7059d709d503bab6e2b61931737e662dd293b40578ccornelius    /**
7159d709d503bab6e2b61931737e662dd293b40578ccornelius     * Type representing a territory.
72fceb39872958b9fa2505e63f8b8699a9e0f882f4ccornelius     * @stable ICU 51
7359d709d503bab6e2b61931737e662dd293b40578ccornelius     */
7459d709d503bab6e2b61931737e662dd293b40578ccornelius    URGN_TERRITORY,
7559d709d503bab6e2b61931737e662dd293b40578ccornelius
7659d709d503bab6e2b61931737e662dd293b40578ccornelius    /**
7759d709d503bab6e2b61931737e662dd293b40578ccornelius     * Type representing the whole world.
78fceb39872958b9fa2505e63f8b8699a9e0f882f4ccornelius     * @stable ICU 51
7959d709d503bab6e2b61931737e662dd293b40578ccornelius     */
8059d709d503bab6e2b61931737e662dd293b40578ccornelius    URGN_WORLD,
8159d709d503bab6e2b61931737e662dd293b40578ccornelius
8259d709d503bab6e2b61931737e662dd293b40578ccornelius    /**
8359d709d503bab6e2b61931737e662dd293b40578ccornelius     * Type representing a continent.
84fceb39872958b9fa2505e63f8b8699a9e0f882f4ccornelius     * @stable ICU 51
8559d709d503bab6e2b61931737e662dd293b40578ccornelius     */
8659d709d503bab6e2b61931737e662dd293b40578ccornelius    URGN_CONTINENT,
8759d709d503bab6e2b61931737e662dd293b40578ccornelius
8859d709d503bab6e2b61931737e662dd293b40578ccornelius    /**
8959d709d503bab6e2b61931737e662dd293b40578ccornelius     * Type representing a sub-continent.
90fceb39872958b9fa2505e63f8b8699a9e0f882f4ccornelius     * @stable ICU 51
9159d709d503bab6e2b61931737e662dd293b40578ccornelius     */
9259d709d503bab6e2b61931737e662dd293b40578ccornelius    URGN_SUBCONTINENT,
9359d709d503bab6e2b61931737e662dd293b40578ccornelius
9459d709d503bab6e2b61931737e662dd293b40578ccornelius    /**
9559d709d503bab6e2b61931737e662dd293b40578ccornelius     * Type representing a grouping of territories that is not to be used in
9659d709d503bab6e2b61931737e662dd293b40578ccornelius     * the normal WORLD/CONTINENT/SUBCONTINENT/TERRITORY containment tree.
97fceb39872958b9fa2505e63f8b8699a9e0f882f4ccornelius     * @stable ICU 51
9859d709d503bab6e2b61931737e662dd293b40578ccornelius     */
9959d709d503bab6e2b61931737e662dd293b40578ccornelius    URGN_GROUPING,
10059d709d503bab6e2b61931737e662dd293b40578ccornelius
10159d709d503bab6e2b61931737e662dd293b40578ccornelius    /**
10259d709d503bab6e2b61931737e662dd293b40578ccornelius     * Type representing a region whose code has been deprecated, usually
10359d709d503bab6e2b61931737e662dd293b40578ccornelius     * due to a country splitting into multiple territories or changing its name.
104fceb39872958b9fa2505e63f8b8699a9e0f882f4ccornelius     * @stable ICU 51
10559d709d503bab6e2b61931737e662dd293b40578ccornelius     */
10659d709d503bab6e2b61931737e662dd293b40578ccornelius    URGN_DEPRECATED,
10759d709d503bab6e2b61931737e662dd293b40578ccornelius
10859d709d503bab6e2b61931737e662dd293b40578ccornelius    /**
10959d709d503bab6e2b61931737e662dd293b40578ccornelius     * Maximum value for this unumeration.
110fceb39872958b9fa2505e63f8b8699a9e0f882f4ccornelius     * @stable ICU 51
11159d709d503bab6e2b61931737e662dd293b40578ccornelius     */
11259d709d503bab6e2b61931737e662dd293b40578ccornelius    URGN_LIMIT
11359d709d503bab6e2b61931737e662dd293b40578ccornelius} URegionType;
11459d709d503bab6e2b61931737e662dd293b40578ccornelius
11559d709d503bab6e2b61931737e662dd293b40578ccornelius#if !UCONFIG_NO_FORMATTING
11659d709d503bab6e2b61931737e662dd293b40578ccornelius
11759d709d503bab6e2b61931737e662dd293b40578ccornelius#ifndef U_HIDE_DRAFT_API
11859d709d503bab6e2b61931737e662dd293b40578ccornelius
11959d709d503bab6e2b61931737e662dd293b40578ccornelius/**
12059d709d503bab6e2b61931737e662dd293b40578ccornelius * Opaque URegion object for use in C programs.
12159d709d503bab6e2b61931737e662dd293b40578ccornelius * @draft ICU 52
12259d709d503bab6e2b61931737e662dd293b40578ccornelius */
12359d709d503bab6e2b61931737e662dd293b40578ccorneliusstruct URegion;
12459d709d503bab6e2b61931737e662dd293b40578ccorneliustypedef struct URegion URegion; /**< @draft ICU 52 */
12559d709d503bab6e2b61931737e662dd293b40578ccornelius
12659d709d503bab6e2b61931737e662dd293b40578ccornelius/**
12759d709d503bab6e2b61931737e662dd293b40578ccornelius * Returns a pointer to a URegion for the specified region code: A 2-letter or 3-letter ISO 3166
12859d709d503bab6e2b61931737e662dd293b40578ccornelius * code, UN M.49 numeric code (superset of ISO 3166 numeric codes), or other valid Unicode Region
12959d709d503bab6e2b61931737e662dd293b40578ccornelius * Code as defined by the LDML specification. The code will be canonicalized internally. If the
13059d709d503bab6e2b61931737e662dd293b40578ccornelius * region code is NULL or not recognized, the appropriate error code will be set
13159d709d503bab6e2b61931737e662dd293b40578ccornelius * (U_ILLEGAL_ARGUMENT_ERROR).
13259d709d503bab6e2b61931737e662dd293b40578ccornelius * @draft ICU 52
13359d709d503bab6e2b61931737e662dd293b40578ccornelius */
13459d709d503bab6e2b61931737e662dd293b40578ccorneliusU_DRAFT const URegion* U_EXPORT2
13559d709d503bab6e2b61931737e662dd293b40578ccorneliusuregion_getRegionFromCode(const char *regionCode, UErrorCode *status);
13659d709d503bab6e2b61931737e662dd293b40578ccornelius
13759d709d503bab6e2b61931737e662dd293b40578ccornelius/**
13859d709d503bab6e2b61931737e662dd293b40578ccornelius * Returns a pointer to a URegion for the specified numeric region code. If the numeric region
13959d709d503bab6e2b61931737e662dd293b40578ccornelius * code is not recognized, the appropriate error code will be set (U_ILLEGAL_ARGUMENT_ERROR).
14059d709d503bab6e2b61931737e662dd293b40578ccornelius * @draft ICU 52
14159d709d503bab6e2b61931737e662dd293b40578ccornelius */
14259d709d503bab6e2b61931737e662dd293b40578ccorneliusU_DRAFT const URegion* U_EXPORT2
14359d709d503bab6e2b61931737e662dd293b40578ccorneliusuregion_getRegionFromNumericCode (int32_t code, UErrorCode *status);
14459d709d503bab6e2b61931737e662dd293b40578ccornelius
14559d709d503bab6e2b61931737e662dd293b40578ccornelius/**
14659d709d503bab6e2b61931737e662dd293b40578ccornelius * Returns an enumeration over the canonical codes of all known regions that match the given type.
14759d709d503bab6e2b61931737e662dd293b40578ccornelius * The enumeration must be closed with with uenum_close().
14859d709d503bab6e2b61931737e662dd293b40578ccornelius * @draft ICU 52
14959d709d503bab6e2b61931737e662dd293b40578ccornelius */
15059d709d503bab6e2b61931737e662dd293b40578ccorneliusU_DRAFT UEnumeration* U_EXPORT2
15159d709d503bab6e2b61931737e662dd293b40578ccorneliusuregion_getAvailable(URegionType type, UErrorCode *status);
15259d709d503bab6e2b61931737e662dd293b40578ccornelius
15359d709d503bab6e2b61931737e662dd293b40578ccornelius/**
15459d709d503bab6e2b61931737e662dd293b40578ccornelius * Returns true if the specified uregion is equal to the specified otherRegion.
15559d709d503bab6e2b61931737e662dd293b40578ccornelius * @draft ICU 52
15659d709d503bab6e2b61931737e662dd293b40578ccornelius */
15759d709d503bab6e2b61931737e662dd293b40578ccorneliusU_DRAFT UBool U_EXPORT2
15859d709d503bab6e2b61931737e662dd293b40578ccorneliusuregion_areEqual(const URegion* uregion, const URegion* otherRegion);
15959d709d503bab6e2b61931737e662dd293b40578ccornelius
16059d709d503bab6e2b61931737e662dd293b40578ccornelius/**
16159d709d503bab6e2b61931737e662dd293b40578ccornelius * Returns a pointer to the URegion that contains the specified uregion. Returns NULL if the
16259d709d503bab6e2b61931737e662dd293b40578ccornelius * specified uregion is code "001" (World) or "ZZ" (Unknown region). For example, calling
16359d709d503bab6e2b61931737e662dd293b40578ccornelius * this method with region "IT" (Italy) returns the URegion for "039" (Southern Europe).
16459d709d503bab6e2b61931737e662dd293b40578ccornelius * @draft ICU 52
16559d709d503bab6e2b61931737e662dd293b40578ccornelius */
16659d709d503bab6e2b61931737e662dd293b40578ccorneliusU_DRAFT const URegion* U_EXPORT2
16759d709d503bab6e2b61931737e662dd293b40578ccorneliusuregion_getContainingRegion(const URegion* uregion);
16859d709d503bab6e2b61931737e662dd293b40578ccornelius
16959d709d503bab6e2b61931737e662dd293b40578ccornelius/**
17059d709d503bab6e2b61931737e662dd293b40578ccornelius * Return a pointer to the URegion that geographically contains this uregion and matches the
17159d709d503bab6e2b61931737e662dd293b40578ccornelius * specified type, moving multiple steps up the containment chain if necessary. Returns NULL if no
17259d709d503bab6e2b61931737e662dd293b40578ccornelius * containing region can be found that matches the specified type. Will return NULL if URegionType
17359d709d503bab6e2b61931737e662dd293b40578ccornelius * is URGN_GROUPING, URGN_DEPRECATED, or URGN_UNKNOWN which are not appropriate for this API.
17459d709d503bab6e2b61931737e662dd293b40578ccornelius * For example, calling this method with uregion "IT" (Italy) for type URGN_CONTINENT returns the
17559d709d503bab6e2b61931737e662dd293b40578ccornelius * URegion "150" (Europe).
17659d709d503bab6e2b61931737e662dd293b40578ccornelius * @draft ICU 52
17759d709d503bab6e2b61931737e662dd293b40578ccornelius */
17859d709d503bab6e2b61931737e662dd293b40578ccorneliusU_DRAFT const URegion* U_EXPORT2
17959d709d503bab6e2b61931737e662dd293b40578ccorneliusuregion_getContainingRegionOfType(const URegion* uregion, URegionType type);
18059d709d503bab6e2b61931737e662dd293b40578ccornelius
18159d709d503bab6e2b61931737e662dd293b40578ccornelius/**
18259d709d503bab6e2b61931737e662dd293b40578ccornelius * Return an enumeration over the canonical codes of all the regions that are immediate children
18359d709d503bab6e2b61931737e662dd293b40578ccornelius * of the specified uregion in the region hierarchy. These returned regions could be either macro
18459d709d503bab6e2b61931737e662dd293b40578ccornelius * regions, territories, or a mixture of the two, depending on the containment data as defined in
18559d709d503bab6e2b61931737e662dd293b40578ccornelius * CLDR. This API returns NULL if this uregion doesn't have any sub-regions. For example, calling
18659d709d503bab6e2b61931737e662dd293b40578ccornelius * this function for uregion "150" (Europe) returns an enumeration containing the various
18759d709d503bab6e2b61931737e662dd293b40578ccornelius * sub-regions of Europe: "039" (Southern Europe), "151" (Eastern Europe), "154" (Northern Europe),
18859d709d503bab6e2b61931737e662dd293b40578ccornelius * and "155" (Western Europe). The enumeration must be closed with with uenum_close().
18959d709d503bab6e2b61931737e662dd293b40578ccornelius * @draft ICU 52
19059d709d503bab6e2b61931737e662dd293b40578ccornelius */
19159d709d503bab6e2b61931737e662dd293b40578ccorneliusU_DRAFT UEnumeration* U_EXPORT2
19259d709d503bab6e2b61931737e662dd293b40578ccorneliusuregion_getContainedRegions(const URegion* uregion, UErrorCode *status);
19359d709d503bab6e2b61931737e662dd293b40578ccornelius
19459d709d503bab6e2b61931737e662dd293b40578ccornelius/**
19559d709d503bab6e2b61931737e662dd293b40578ccornelius * Returns an enumeration over the canonical codes of all the regions that are children of the
19659d709d503bab6e2b61931737e662dd293b40578ccornelius * specified uregion anywhere in the region hierarchy and match the given type. This API may return
19759d709d503bab6e2b61931737e662dd293b40578ccornelius * an empty enumeration if this uregion doesn't have any sub-regions that match the given type.
19859d709d503bab6e2b61931737e662dd293b40578ccornelius * For example, calling this method with region "150" (Europe) and type URGN_TERRITORY" returns an
19959d709d503bab6e2b61931737e662dd293b40578ccornelius * enumeration containing all the territories in Europe: "FR" (France), "IT" (Italy), "DE" (Germany),
20059d709d503bab6e2b61931737e662dd293b40578ccornelius * etc. The enumeration must be closed with with uenum_close().
20159d709d503bab6e2b61931737e662dd293b40578ccornelius * @draft ICU 52
20259d709d503bab6e2b61931737e662dd293b40578ccornelius */
20359d709d503bab6e2b61931737e662dd293b40578ccorneliusU_DRAFT UEnumeration* U_EXPORT2
20459d709d503bab6e2b61931737e662dd293b40578ccorneliusuregion_getContainedRegionsOfType(const URegion* uregion, URegionType type, UErrorCode *status);
20559d709d503bab6e2b61931737e662dd293b40578ccornelius
20659d709d503bab6e2b61931737e662dd293b40578ccornelius/**
20759d709d503bab6e2b61931737e662dd293b40578ccornelius * Returns true if the specified uregion contains the specified otherRegion anywhere in the region
20859d709d503bab6e2b61931737e662dd293b40578ccornelius * hierarchy.
20959d709d503bab6e2b61931737e662dd293b40578ccornelius * @draft ICU 52
21059d709d503bab6e2b61931737e662dd293b40578ccornelius */
21159d709d503bab6e2b61931737e662dd293b40578ccorneliusU_DRAFT UBool U_EXPORT2
21259d709d503bab6e2b61931737e662dd293b40578ccorneliusuregion_contains(const URegion* uregion, const URegion* otherRegion);
21359d709d503bab6e2b61931737e662dd293b40578ccornelius
21459d709d503bab6e2b61931737e662dd293b40578ccornelius/**
21559d709d503bab6e2b61931737e662dd293b40578ccornelius * If the specified uregion is deprecated, returns an enumeration over the canonical codes of the
21659d709d503bab6e2b61931737e662dd293b40578ccornelius * regions that are the preferred replacement regions for the specified uregion. If the specified
21759d709d503bab6e2b61931737e662dd293b40578ccornelius * uregion is not deprecated, returns NULL. For example, calling this method with uregion
21859d709d503bab6e2b61931737e662dd293b40578ccornelius * "SU" (Soviet Union) returns a list of the regions containing "RU" (Russia), "AM" (Armenia),
21959d709d503bab6e2b61931737e662dd293b40578ccornelius * "AZ" (Azerbaijan), etc... The enumeration must be closed with with uenum_close().
22059d709d503bab6e2b61931737e662dd293b40578ccornelius * @draft ICU 52
22159d709d503bab6e2b61931737e662dd293b40578ccornelius */
22259d709d503bab6e2b61931737e662dd293b40578ccorneliusU_DRAFT UEnumeration* U_EXPORT2
22359d709d503bab6e2b61931737e662dd293b40578ccorneliusuregion_getPreferredValues(const URegion* uregion, UErrorCode *status);
22459d709d503bab6e2b61931737e662dd293b40578ccornelius
22559d709d503bab6e2b61931737e662dd293b40578ccornelius/**
22659d709d503bab6e2b61931737e662dd293b40578ccornelius * Returns the specified uregion's canonical code.
22759d709d503bab6e2b61931737e662dd293b40578ccornelius * @draft ICU 52
22859d709d503bab6e2b61931737e662dd293b40578ccornelius */
22959d709d503bab6e2b61931737e662dd293b40578ccorneliusU_DRAFT const char* U_EXPORT2
23059d709d503bab6e2b61931737e662dd293b40578ccorneliusuregion_getRegionCode(const URegion* uregion);
23159d709d503bab6e2b61931737e662dd293b40578ccornelius
23259d709d503bab6e2b61931737e662dd293b40578ccornelius/**
23359d709d503bab6e2b61931737e662dd293b40578ccornelius * Returns the specified uregion's numeric code, or a negative value if there is no numeric code
23459d709d503bab6e2b61931737e662dd293b40578ccornelius * for the specified uregion.
23559d709d503bab6e2b61931737e662dd293b40578ccornelius * @draft ICU 52
23659d709d503bab6e2b61931737e662dd293b40578ccornelius */
23759d709d503bab6e2b61931737e662dd293b40578ccorneliusU_DRAFT int32_t U_EXPORT2
23859d709d503bab6e2b61931737e662dd293b40578ccorneliusuregion_getNumericCode(const URegion* uregion);
23959d709d503bab6e2b61931737e662dd293b40578ccornelius
24059d709d503bab6e2b61931737e662dd293b40578ccornelius/**
24159d709d503bab6e2b61931737e662dd293b40578ccornelius * Returns the URegionType of the specified uregion.
24259d709d503bab6e2b61931737e662dd293b40578ccornelius * @draft ICU 52
24359d709d503bab6e2b61931737e662dd293b40578ccornelius */
24459d709d503bab6e2b61931737e662dd293b40578ccorneliusU_DRAFT URegionType U_EXPORT2
24559d709d503bab6e2b61931737e662dd293b40578ccorneliusuregion_getType(const URegion* uregion);
24659d709d503bab6e2b61931737e662dd293b40578ccornelius
24759d709d503bab6e2b61931737e662dd293b40578ccornelius#endif  /* U_HIDE_DRAFT_API */
24859d709d503bab6e2b61931737e662dd293b40578ccornelius
24959d709d503bab6e2b61931737e662dd293b40578ccornelius#endif /* #if !UCONFIG_NO_FORMATTING */
25059d709d503bab6e2b61931737e662dd293b40578ccornelius
25159d709d503bab6e2b61931737e662dd293b40578ccornelius#endif
252