* </code>
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*
- * @param[in] c The code point to test.
- * @param[in] which The #i18n_uchar_uproperty_e selector constant, identifies which property to check \n
- * Must be #I18N_UCHAR_BINARY_START<=which<#I18N_UCHAR_BINARY_LIMIT
- * or #I18N_UCHAR_INT_START<=which<#I18N_UCHAR_INT_LIMIT
- * or #I18N_UCHAR_MASK_START<=which<#I18N_UCHAR_MASK_LIMIT.
+ * @param[in] c The code point to test.
+ * @param[in] which The #i18n_uchar_uproperty_e selector constant, identifies which property
+ * to check. \n Must be
+ * <code>#I18N_UCHAR_BINARY_START <= @a which < #I18N_UCHAR_BINARY_LIMIT</code>
+ * or <code>#I18N_UCHAR_INT_START <= @a which < #I18N_UCHAR_INT_LIMIT</code>
+ * or <code>#I18N_UCHAR_MASK_START <= @a which < #I18N_UCHAR_MASK_LIMIT</code>.
* @param[out] property_val The numeric value that is directly the property value or,
- * for enumerated properties, corresponds to the numeric value of the enumerated
- * constant of the respective property value enumeration type (cast to enum type if necessary)\n
- * Returns @c 0 or @c 1 (for false/true) for binary Unicode properties\n
- * Returns a bit-mask for mask properties \n
- * Returns @c 0 if 'which' is out of bounds or if the Unicode version does not have data for the property at all, or not for this code point.
+ * for enumerated properties, corresponds to the numeric value of the
+ * enumerated constant of the respective property value enumeration type
+ * (cast to enum type if necessary)\n
+ * Returns @c 0 or @c 1 (for false/true) for binary Unicode properties\n
+ * Returns a bit-mask for mask properties \n
+ * Returns @c 0 if @a which is out of bounds or if the Unicode version does
+ * not have data for the property at all, or not for this code point.
*
- * @retval #I18N_ERROR_NONE Successful
+ * @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
int i18n_uchar_get_int_property_value(i18n_uchar32 c, i18n_uchar_uproperty_e which, int32_t *property_val);
* @brief Gets the Unicode allocation block that contains the character.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*
- * @param[in] c The code point to test
- * @param[out] block_val The block value for the code point
+ * @param[in] c The code point to test
+ * @param[out] block_val The block value for the code point
*
- * @retval #I18N_ERROR_NONE Successful
+ * @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
int i18n_uchar_get_ublock_code(i18n_uchar32 c, i18n_uchar_ublock_code_e *block_val);
+/**
+ * @brief Gets the numeric value for a Unicode code point as defined in the Unicode Character Database.
+ * @details A "double" param type is necessary because some numeric values are fractions, negative,
+ * or too large for int32_t. For characters without any numeric values in the Unicode
+ * Character Database, @a numeric_val will be equal to #I18N_U_NO_NUMERIC_VALUE.
+ * Note: This is different from the Unicode Standard which specifies NaN as the default
+ * value. (NaN is not available on all platforms) This function is similar to
+ * java.lang.Character.getNumericValue(), but i18n_uchar_get_numeric_value() also supports
+ * negative values, large values, and fractions, while Java's getNumericValue() returns
+ * values 10..35 for ASCII letters.
+ * @since_tizen 4.0
+ *
+ * @param[in] c The code point to get the numeric value for
+ * @param[out] numeric_val The numeric value of @a c or #I18N_U_NO_NUMERIC_VALUE if none is defined
+ *
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #I18N_ERROR_NONE Successful
+ * @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
+ * @see #I18N_U_NO_NUMERIC_VALUE
+ */
+int i18n_uchar_get_numeric_value(i18n_uchar32 c, double *numeric_val);
+
#ifdef __cplusplus
}
#endif