#include "unicode/utypes.h"
-/**
- * \def NUMSYS_NAME_CAPACITY
- * Size of a numbering system name.
- * @internal
- */
-#define NUMSYS_NAME_CAPACITY 8
-
-
/**
* \file
* \brief C++ API: NumberingSystem object
#if !UCONFIG_NO_FORMATTING
-
#include "unicode/format.h"
#include "unicode/uobject.h"
#if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN
+// can't be #ifndef U_HIDE_INTERNAL_API; needed for char[] field size
+/**
+ * Size of a numbering system name.
+ * @internal
+ */
+constexpr const size_t kInternalNumSysNameCapacity = 8;
+
/**
* Defines numbering systems. A numbering system describes the scheme by which
* numbers are to be presented to the end user. In its simplest form, a numbering
/**
* Return a StringEnumeration over all the names of numbering systems known to ICU.
+ * The numbering system names will be in alphabetical (invariant) order.
+ *
+ * The returned StringEnumeration is owned by the caller, who must delete it when
+ * finished with it.
+ *
* @stable ICU 4.2
*/
-
static StringEnumeration * U_EXPORT2 getAvailableNames(UErrorCode& status);
/**
* default, native, traditional, finance - do not identify specific numbering systems,
* but rather key values that may only be used as part of a locale, which in turn
* defines how they are mapped to a specific numbering system such as "latn" or "hant".
+ *
* @param name The name of the numbering system.
- * @param status ICU status
+ * @param status ICU status; set to U_UNSUPPORTED_ERROR if numbering system not found.
+ * @return The NumberingSystem instance, or nullptr if not found.
* @stable ICU 4.2
*/
static NumberingSystem* U_EXPORT2 createInstanceByName(const char* name, UErrorCode& status);
UnicodeString desc;
int32_t radix;
UBool algorithmic;
- char name[NUMSYS_NAME_CAPACITY+1];
+ char name[kInternalNumSysNameCapacity+1];
void setRadix(int32_t radix);