set of UIdentifierType values.
*
* @param c code point
* @param type Identifier_Type to check
* @return true if type is in Identifier_Type(c)
* @stable ICU 75
*/
U_CAPI bool U_EXPORT2
u_hasIDType(UChar32 c, UIdentifierType type);
/**
* Writes code point c's Identifier_Type as a list of UIdentifierType values
* to the output types array and returns the number of types.
*
* Used for UTS #39 General Security Profile for Identifiers
* (https://www.unicode.org/reports/tr39/#General_Security_Profile).
*
* Each code point maps to a set of UIdentifierType values.
* There is always at least one type.
* The order of output values is undefined.
* Each type is output at most once;
* there cannot be more output values than UIdentifierType constants.
* In addition, only some of the types can be combined with others,
* and usually only a small number of types occur together.
* Future versions might add additional types.
* See UTS #39 and its data files for details.
*
* If there are more than capacity types to be written, then
* U_BUFFER_OVERFLOW_ERROR is set and the number of types is returned.
* (Usual ICU buffer handling behavior.)
*
* @param c code point
* @param types output array
* @param capacity capacity of the array
* @param pErrorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function returns
* immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details.)
* @return number of values in c's Identifier_Type,
* written to types unless U_BUFFER_OVERFLOW_ERROR indicates insufficient capacity
* @stable ICU 75
*/
U_CAPI int32_t U_EXPORT2
u_getIDTypes(UChar32 c, UIdentifierType *types, int32_t capacity, UErrorCode *pErrorCode);
/**
* Determines if the specified character should be regarded
* as an ignorable character in an identifier,
* according to Java.
* True for characters with general category "Cf" (format controls) as well as
* non-whitespace ISO controls
* (U+0000..U+0008, U+000E..U+001B, U+007F..U+009F).
*
* Same as java.lang.Character.isIdentifierIgnorable().
*
* Note that Unicode just recommends to ignore Cf (format controls).
*
* @param c the code point to be tested
* @return true if the code point is ignorable in identifiers according to Java
*
* @see UCHAR_DEFAULT_IGNORABLE_CODE_POINT
* @see u_isIDStart
* @see u_isIDPart
* @stable ICU 2.0
*/
U_CAPI UBool U_EXPORT2
u_isIDIgnorable(UChar32 c);
/**
* Determines if the specified character is permissible as the
* first character in a Java identifier.
* In addition to u_isIDStart(c), true for characters with
* general categories "Sc" (currency symbols) and "Pc" (connecting punctuation).
*
* Same as java.lang.Character.isJavaIdentifierStart().
*
* @param c the code point to be tested
* @return true if the code point may start a Java identifier
*
* @see u_isJavaIDPart
* @see u_isalpha
* @see u_isIDStart
* @stable ICU 2.0
*/
U_CAPI UBool U_EXPORT2
u_isJavaIDStart(UChar32 c);
/**
* Determines if the specified character is permissible
* in a Java identifier.
* In addition to u_isIDPart(c), true for characters with
* general category "Sc" (currency symbols).
*
* Same as java.lang.Character.isJavaIdentifierPart().
*
* @param c the code point to be tested
* @return true if the code point may occur in a Java identifier
*
* @see u_isIDIgnorable
* @see u_isJavaIDStart
* @see u_isalpha
* @see u_isdigit
* @see u_isIDPart
* @stable ICU 2.0
*/
U_CAPI UBool U_EXPORT2
u_isJavaIDPart(UChar32 c);
/**
* The given character is mapped to its lowercase equivalent according to
* UnicodeData.txt; if the character has no lowercase equivalent, the character
* itself is returned.
*
* Same as java.lang.Character.toLowerCase().
*
* This function only returns the simple, single-code point case mapping.
* Full case mappings should be used whenever possible because they produce
* better results by working on whole strings.
* They take into account the string context and the language and can map
* to a result string with a different length as appropriate.
* Full case mappings are applied by the string case mapping functions,
* see ustring.h and the UnicodeString class.
* See also the User Guide chapter on C/POSIX migration:
* https://unicode-org.github.io/icu/userguide/icu/posix#case-mappings
*
* @param c the code point to be mapped
* @return the Simple_Lowercase_Mapping of the code point, if any;
* otherwise the code point itself.
* @stable ICU 2.0
*/
U_CAPI UChar32 U_EXPORT2
u_tolower(UChar32 c);
/**
* The given character is mapped to its uppercase equivalent according to UnicodeData.txt;
* if the character has no uppercase equivalent, the character itself is
* returned.
*
* Same as java.lang.Character.toUpperCase().
*
* This function only returns the simple, single-code point case mapping.
* Full case mappings should be used whenever possible because they produce
* better results by working on whole strings.
* They take into account the string context and the language and can map
* to a result string with a different length as appropriate.
* Full case mappings are applied by the string case mapping functions,
* see ustring.h and the UnicodeString class.
* See also the User Guide chapter on C/POSIX migration:
* https://unicode-org.github.io/icu/userguide/icu/posix#case-mappings
*
* @param c the code point to be mapped
* @return the Simple_Uppercase_Mapping of the code point, if any;
* otherwise the code point itself.
* @stable ICU 2.0
*/
U_CAPI UChar32 U_EXPORT2
u_toupper(UChar32 c);
/**
* The given character is mapped to its titlecase equivalent
* according to UnicodeData.txt;
* if none is defined, the character itself is returned.
*
* Same as java.lang.Character.toTitleCase().
*
* This function only returns the simple, single-code point case mapping.
* Full case mappings should be used whenever possible because they produce
* better results by working on whole strings.
* They take into account the string context and the language and can map
* to a result string with a different length as appropriate.
* Full case mappings are applied by the string case mapping functions,
* see ustring.h and the UnicodeString class.
* See also the User Guide chapter on C/POSIX migration:
* https://unicode-org.github.io/icu/userguide/icu/posix#case-mappings
*
* @param c the code point to be mapped
* @return the Simple_Titlecase_Mapping of the code point, if any;
* otherwise the code point itself.
* @stable ICU 2.0
*/
U_CAPI UChar32 U_EXPORT2
u_totitle(UChar32 c);
/**
* The given character is mapped to its case folding equivalent according to
* UnicodeData.txt and CaseFolding.txt;
* if the character has no case folding equivalent, the character
* itself is returned.
*
* This function only returns the simple, single-code point case mapping.
* Full case mappings should be used whenever possible because they produce
* better results by working on whole strings.
* They take into account the string context and the language and can map
* to a result string with a different length as appropriate.
* Full case mappings are applied by the string case mapping functions,
* see ustring.h and the UnicodeString class.
* See also the User Guide chapter on C/POSIX migration:
* https://unicode-org.github.io/icu/userguide/icu/posix#case-mappings
*
* @param c the code point to be mapped
* @param options Either U_FOLD_CASE_DEFAULT or U_FOLD_CASE_EXCLUDE_SPECIAL_I
* @return the Simple_Case_Folding of the code point, if any;
* otherwise the code point itself.
* @stable ICU 2.0
*/
U_CAPI UChar32 U_EXPORT2
u_foldCase(UChar32 c, uint32_t options);
/**
* Returns the decimal digit value of the code point in the
* specified radix.
*
* If the radix is not in the range 2<=radix<=36 or if the
* value of c is not a valid digit in the specified
* radix, -1 is returned. A character is a valid digit
* if at least one of the following is true:
*
* - The character has a decimal digit value.
* Such characters have the general category "Nd" (decimal digit numbers)
* and a Numeric_Type of Decimal.
* In this case the value is the character's decimal digit value.
* - The character is one of the uppercase Latin letters
*
'A' through 'Z'.
* In this case the value is c-'A'+10.
* - The character is one of the lowercase Latin letters
*
'a' through 'z'.
* In this case the value is ch-'a'+10.
* - Latin letters from both the ASCII range (0061..007A, 0041..005A)
* as well as from the Fullwidth ASCII range (FF41..FF5A, FF21..FF3A)
* are recognized.
*
*
* Same as java.lang.Character.digit().
*
* @param ch the code point to be tested.
* @param radix the radix.
* @return the numeric value represented by the character in the
* specified radix,
* or -1 if there is no value or if the value exceeds the radix.
*
* @see UCHAR_NUMERIC_TYPE
* @see u_forDigit
* @see u_charDigitValue
* @see u_isdigit
* @stable ICU 2.0
*/
U_CAPI int32_t U_EXPORT2
u_digit(UChar32 ch, int8_t radix);
/**
* Determines the character representation for a specific digit in
* the specified radix. If the value of radix is not a
* valid radix, or the value of digit is not a valid
* digit in the specified radix, the null character
* (U+0000) is returned.
*
* The radix argument is valid if it is greater than or
* equal to 2 and less than or equal to 36.
* The digit argument is valid if
* 0 <= digit < radix.
*
* If the digit is less than 10, then
* '0' + digit is returned. Otherwise, the value
* 'a' + digit - 10 is returned.
*
* Same as java.lang.Character.forDigit().
*
* @param digit the number to convert to a character.
* @param radix the radix.
* @return the char representation of the specified digit
* in the specified radix.
*
* @see u_digit
* @see u_charDigitValue
* @see u_isdigit
* @stable ICU 2.0
*/
U_CAPI UChar32 U_EXPORT2
u_forDigit(int32_t digit, int8_t radix);
/**
* Get the "age" of the code point.
* The "age" is the Unicode version when the code point was first
* designated (as a non-character or for Private Use)
* or assigned a character.
* This can be useful to avoid emitting code points to receiving
* processes that do not accept newer characters.
* The data is from the UCD file DerivedAge.txt.
*
* @param c The code point.
* @param versionArray The Unicode version number array, to be filled in.
*
* @stable ICU 2.1
*/
U_CAPI void U_EXPORT2
u_charAge(UChar32 c, UVersionInfo versionArray);
/**
* Gets the Unicode version information.
* The version array is filled in with the version information
* for the Unicode standard that is currently used by ICU.
* For example, Unicode version 3.1.1 is represented as an array with
* the values { 3, 1, 1, 0 }.
*
* @param versionArray an output array that will be filled in with
* the Unicode version number
* @stable ICU 2.0
*/
U_CAPI void U_EXPORT2
u_getUnicodeVersion(UVersionInfo versionArray);
#if !UCONFIG_NO_NORMALIZATION
/**
* Get the FC_NFKC_Closure property string for a character.
* See Unicode Standard Annex #15 for details, search for "FC_NFKC_Closure"
* or for "FNC": http://www.unicode.org/reports/tr15/
*
* @param c The character (code point) for which to get the FC_NFKC_Closure string.
* It must be 0<=c<=0x10ffff.
* @param dest Destination address for copying the string.
* The string will be zero-terminated if possible.
* If there is no FC_NFKC_Closure string,
* then the buffer will be set to the empty string.
* @param destCapacity ==sizeof(dest)
* @param pErrorCode Pointer to a UErrorCode variable.
* @return The length of the string, or 0 if there is no FC_NFKC_Closure string for this character.
* If the destCapacity is less than or equal to the length, then the buffer
* contains the truncated name and the returned length indicates the full
* length of the name.
* The length does not include the zero-termination.
*
* @stable ICU 2.2
*/
U_CAPI int32_t U_EXPORT2
u_getFC_NFKC_Closure(UChar32 c, UChar *dest, int32_t destCapacity, UErrorCode *pErrorCode);
#endif
U_CDECL_END
#endif /*_UCHAR*/
/*eof*/