2<=radix<=36 or if the
4076 * value of c
is not a valid digit in the specified
4077 * radix, -1
is returned. A character is a valid digit
4078 * if at least one of the following is true:
4079 *
4080 * - The character has a decimal digit value.
4081 * Such characters have the general category "Nd" (decimal digit numbers)
4082 * and a Numeric_Type of Decimal.
4083 * In this case the value is the character's decimal digit value.
4084 * - The character is one of the uppercase Latin letters
4085 *
'A'
through 'Z'
.
4086 * In this case the value is c-'A'+10
.
4087 * - The character is one of the lowercase Latin letters
4088 *
'a'
through 'z'
.
4089 * In this case the value is ch-'a'+10
.
4090 * - Latin letters from both the ASCII range (0061..007A, 0041..005A)
4091 * as well as from the Fullwidth ASCII range (FF41..FF5A, FF21..FF3A)
4092 * are recognized.
4093 *
4094 *
4095 * Same as java.lang.Character.digit().
4096 *
4097 * @param ch the code point to be tested.
4098 * @param radix the radix.
4099 * @return the numeric value represented by the character in the
4100 * specified radix,
4101 * or -1 if there is no value or if the value exceeds the radix.
4102 *
4103 * @see UCHAR_NUMERIC_TYPE
4104 * @see u_forDigit
4105 * @see u_charDigitValue
4106 * @see u_isdigit
4107 * @stable ICU 2.0
4108 */
4109 U_CAPI int32_t U_EXPORT2
4110 u_digit(UChar32 ch, int8_t radix);
4111
4112 /**
4113 * Determines the character representation for a specific digit in
4114 * the specified radix. If the value of radix
is not a
4115 * valid radix, or the value of digit
is not a valid
4116 * digit in the specified radix, the null character
4117 * (U+0000
) is returned.
4118 *
4119 * The radix
argument is valid if it is greater than or
4120 * equal to 2 and less than or equal to 36.
4121 * The digit
argument is valid if
4122 * 0 <= digit < radix
.
4123 *
4124 * If the digit is less than 10, then
4125 * '0' + digit
is returned. Otherwise, the value
4126 * 'a' + digit - 10
is returned.
4127 *
4128 * Same as java.lang.Character.forDigit().
4129 *
4130 * @param digit the number to convert to a character.
4131 * @param radix the radix.
4132 * @return the char
representation of the specified digit
4133 * in the specified radix.
4134 *
4135 * @see u_digit
4136 * @see u_charDigitValue
4137 * @see u_isdigit
4138 * @stable ICU 2.0
4139 */
4140 U_CAPI UChar32 U_EXPORT2
4141 u_forDigit(int32_t digit, int8_t radix);
4142
4143 /**
4144 * Get the "age" of the code point.
4145 * The "age" is the Unicode version when the code point was first
4146 * designated (as a non-character or for Private Use)
4147 * or assigned a character.
4148 * This can be useful to avoid emitting code points to receiving
4149 * processes that do not accept newer characters.
4150 * The data is from the UCD file DerivedAge.txt.
4151 *
4152 * @param c The code point.
4153 * @param versionArray The Unicode version number array, to be filled in.
4154 *
4155 * @stable ICU 2.1
4156 */
4157 U_CAPI void U_EXPORT2
4158 u_charAge(UChar32 c, UVersionInfo versionArray);
4159
4160 /**
4161 * Gets the Unicode version information.
4162 * The version array is filled in with the version information
4163 * for the Unicode standard that is currently used by ICU.
4164 * For example, Unicode version 3.1.1 is represented as an array with
4165 * the values { 3, 1, 1, 0 }.
4166 *
4167 * @param versionArray an output array that will be filled in with
4168 * the Unicode version number
4169 * @stable ICU 2.0
4170 */
4171 U_CAPI void U_EXPORT2
4172 u_getUnicodeVersion(UVersionInfo versionArray);
4173
4174 #if !UCONFIG_NO_NORMALIZATION
4175 /**
4176 * Get the FC_NFKC_Closure property string for a character.
4177 * See Unicode Standard Annex #15 for details, search for "FC_NFKC_Closure"
4178 * or for "FNC": http://www.unicode.org/reports/tr15/
4179 *
4180 * @param c The character (code point) for which to get the FC_NFKC_Closure string.
4181 * It must be 0<=c<=0x10ffff
.
4182 * @param dest Destination address for copying the string.
4183 * The string will be zero-terminated if possible.
4184 * If there is no FC_NFKC_Closure string,
4185 * then the buffer will be set to the empty string.
4186 * @param destCapacity ==sizeof(dest)
4187 * @param pErrorCode Pointer to a UErrorCode variable.
4188 * @return The length of the string, or 0 if there is no FC_NFKC_Closure string for this character.
4189 * If the destCapacity is less than or equal to the length, then the buffer
4190 * contains the truncated name and the returned length indicates the full
4191 * length of the name.
4192 * The length does not include the zero-termination.
4193 *
4194 * @stable ICU 2.2
4195 */
4196 U_CAPI int32_t U_EXPORT2
4197 u_getFC_NFKC_Closure(UChar32 c, UChar *dest, int32_t destCapacity, UErrorCode *pErrorCode);
4198
4199 #endif
4200
4201
4202 U_CDECL_END
4203
4204 #endif /*_UCHAR*/
4205 /*eof*/