📄 uchar.h
字号:
/** @stable ICU 2.6 */ UBLOCK_TAI_XUAN_JING_SYMBOLS = 124, /*[1D300]*/ /** @stable ICU 2.6 */ UBLOCK_VARIATION_SELECTORS_SUPPLEMENT = 125, /*[E0100]*/ /** @stable ICU 2.0 */ UBLOCK_COUNT, /** @stable ICU 2.0 */ UBLOCK_INVALID_CODE=-1};/** @stable ICU 2.0 */typedef enum UBlockCode UBlockCode;/** * East Asian Width constants. * * @see UCHAR_EAST_ASIAN_WIDTH * @see u_getIntPropertyValue * @stable ICU 2.2 */typedef enum UEastAsianWidth { U_EA_NEUTRAL, /*[N]*/ /*See note !!*/ U_EA_AMBIGUOUS, /*[A]*/ U_EA_HALFWIDTH, /*[H]*/ U_EA_FULLWIDTH, /*[F]*/ U_EA_NARROW, /*[Na]*/ U_EA_WIDE, /*[W]*/ U_EA_COUNT} UEastAsianWidth;/* * Implementation note: * Keep UEastAsianWidth constant values in sync with names list in genprops/props2.c. *//** * Selector constants for u_charName(). * u_charName() returns the "modern" name of a * Unicode character; or the name that was defined in * Unicode version 1.0, before the Unicode standard merged * with ISO-10646; or an "extended" name that gives each * Unicode code point a unique name. * * @see u_charName * @stable ICU 2.0 */typedef enum UCharNameChoice { U_UNICODE_CHAR_NAME, U_UNICODE_10_CHAR_NAME, U_EXTENDED_CHAR_NAME, U_CHAR_NAME_CHOICE_COUNT} UCharNameChoice;/** * Selector constants for u_getPropertyName() and * u_getPropertyValueName(). These selectors are used to choose which * name is returned for a given property or value. All properties and * values have a long name. Most have a short name, but some do not. * Unicode allows for additional names, beyond the long and short * name, which would be indicated by U_LONG_PROPERTY_NAME + i, where * i=1, 2,... * * @see u_getPropertyName() * @see u_getPropertyValueName() * @stable ICU 2.4 */typedef enum UPropertyNameChoice { U_SHORT_PROPERTY_NAME, U_LONG_PROPERTY_NAME, U_PROPERTY_NAME_CHOICE_COUNT} UPropertyNameChoice;/** * Decomposition Type constants. * * @see UCHAR_DECOMPOSITION_TYPE * @stable ICU 2.2 */typedef enum UDecompositionType { U_DT_NONE, /*[none]*/ /*See note !!*/ U_DT_CANONICAL, /*[can]*/ U_DT_COMPAT, /*[com]*/ U_DT_CIRCLE, /*[enc]*/ U_DT_FINAL, /*[fin]*/ U_DT_FONT, /*[font]*/ U_DT_FRACTION, /*[fra]*/ U_DT_INITIAL, /*[init]*/ U_DT_ISOLATED, /*[iso]*/ U_DT_MEDIAL, /*[med]*/ U_DT_NARROW, /*[nar]*/ U_DT_NOBREAK, /*[nb]*/ U_DT_SMALL, /*[sml]*/ U_DT_SQUARE, /*[sqr]*/ U_DT_SUB, /*[sub]*/ U_DT_SUPER, /*[sup]*/ U_DT_VERTICAL, /*[vert]*/ U_DT_WIDE, /*[wide]*/ U_DT_COUNT /* 18 */} UDecompositionType;/** * Joining Type constants. * * @see UCHAR_JOINING_TYPE * @stable ICU 2.2 */typedef enum UJoiningType { U_JT_NON_JOINING, /*[U]*/ /*See note !!*/ U_JT_JOIN_CAUSING, /*[C]*/ U_JT_DUAL_JOINING, /*[D]*/ U_JT_LEFT_JOINING, /*[L]*/ U_JT_RIGHT_JOINING, /*[R]*/ U_JT_TRANSPARENT, /*[T]*/ U_JT_COUNT /* 6 */} UJoiningType;/** * Joining Group constants. * * @see UCHAR_JOINING_GROUP * @stable ICU 2.2 */typedef enum UJoiningGroup { U_JG_NO_JOINING_GROUP, U_JG_AIN, U_JG_ALAPH, U_JG_ALEF, U_JG_BEH, U_JG_BETH, U_JG_DAL, U_JG_DALATH_RISH, U_JG_E, U_JG_FEH, U_JG_FINAL_SEMKATH, U_JG_GAF, U_JG_GAMAL, U_JG_HAH, U_JG_HAMZA_ON_HEH_GOAL, U_JG_HE, U_JG_HEH, U_JG_HEH_GOAL, U_JG_HETH, U_JG_KAF, U_JG_KAPH, U_JG_KNOTTED_HEH, U_JG_LAM, U_JG_LAMADH, U_JG_MEEM, U_JG_MIM, U_JG_NOON, U_JG_NUN, U_JG_PE, U_JG_QAF, U_JG_QAPH, U_JG_REH, U_JG_REVERSED_PE, U_JG_SAD, U_JG_SADHE, U_JG_SEEN, U_JG_SEMKATH, U_JG_SHIN, U_JG_SWASH_KAF, U_JG_SYRIAC_WAW, U_JG_TAH, U_JG_TAW, U_JG_TEH_MARBUTA, U_JG_TETH, U_JG_WAW, U_JG_YEH, U_JG_YEH_BARREE, U_JG_YEH_WITH_TAIL, U_JG_YUDH, U_JG_YUDH_HE, U_JG_ZAIN, U_JG_FE, /**< @stable ICU 2.6 */ U_JG_KHAPH, /**< @stable ICU 2.6 */ U_JG_ZHAIN, /**< @stable ICU 2.6 */ U_JG_COUNT} UJoiningGroup;/** * Line Break constants. * * @see UCHAR_LINE_BREAK * @stable ICU 2.2 */typedef enum ULineBreak { U_LB_UNKNOWN, /*[XX]*/ /*See note !!*/ U_LB_AMBIGUOUS, /*[AI]*/ U_LB_ALPHABETIC, /*[AL]*/ U_LB_BREAK_BOTH, /*[B2]*/ U_LB_BREAK_AFTER, /*[BA]*/ U_LB_BREAK_BEFORE, /*[BB]*/ U_LB_MANDATORY_BREAK, /*[BK]*/ U_LB_CONTINGENT_BREAK, /*[CB]*/ U_LB_CLOSE_PUNCTUATION, /*[CL]*/ U_LB_COMBINING_MARK, /*[CM]*/ U_LB_CARRIAGE_RETURN, /*[CR]*/ U_LB_EXCLAMATION, /*[EX]*/ U_LB_GLUE, /*[GL]*/ U_LB_HYPHEN, /*[HY]*/ U_LB_IDEOGRAPHIC, /*[ID]*/ U_LB_INSEPERABLE, /** Renamed from the misspelled "inseperable" in Unicode 4.0.1/ICU 3.0 @draft ICU 3.0 */ U_LB_INSEPARABLE=U_LB_INSEPERABLE,/*[IN]*/ U_LB_INFIX_NUMERIC, /*[IS]*/ U_LB_LINE_FEED, /*[LF]*/ U_LB_NONSTARTER, /*[NS]*/ U_LB_NUMERIC, /*[NU]*/ U_LB_OPEN_PUNCTUATION, /*[OP]*/ U_LB_POSTFIX_NUMERIC, /*[PO]*/ U_LB_PREFIX_NUMERIC, /*[PR]*/ U_LB_QUOTATION, /*[QU]*/ U_LB_COMPLEX_CONTEXT, /*[SA]*/ U_LB_SURROGATE, /*[SG]*/ U_LB_SPACE, /*[SP]*/ U_LB_BREAK_SYMBOLS, /*[SY]*/ U_LB_ZWSPACE, /*[ZW]*/ U_LB_NEXT_LINE, /*[NL]*/ /* from here on: new in Unicode 4/ICU 2.6 */ U_LB_WORD_JOINER, /*[WJ]*/ U_LB_COUNT} ULineBreak;/** * Numeric Type constants. * * @see UCHAR_NUMERIC_TYPE * @stable ICU 2.2 */typedef enum UNumericType { U_NT_NONE, /*[None]*/ /*See note !!*/ U_NT_DECIMAL, /*[de]*/ U_NT_DIGIT, /*[di]*/ U_NT_NUMERIC, /*[nu]*/ U_NT_COUNT} UNumericType;/** * Hangul Syllable Type constants. * * @see UCHAR_HANGUL_SYLLABLE_TYPE * @stable ICU 2.6 */typedef enum UHangulSyllableType { U_HST_NOT_APPLICABLE, /*[NA]*/ /*See note !!*/ U_HST_LEADING_JAMO, /*[L]*/ U_HST_VOWEL_JAMO, /*[V]*/ U_HST_TRAILING_JAMO, /*[T]*/ U_HST_LV_SYLLABLE, /*[LV]*/ U_HST_LVT_SYLLABLE, /*[LVT]*/ U_HST_COUNT} UHangulSyllableType;/** * Check a binary Unicode property for a code point. * * Unicode, especially in version 3.2, defines many more properties than the * original set in UnicodeData.txt. * * The properties APIs are intended to reflect Unicode properties as defined * in the Unicode Character Database (UCD) and Unicode Technical Reports (UTR). * For details about the properties see http://www.unicode.org/ucd/ . * For names of Unicode properties see the UCD file PropertyAliases.txt. * * Important: If ICU is built with UCD files from Unicode versions below 3.2, * then properties marked with "new in Unicode 3.2" are not or not fully available. * * @param c Code point to test. * @param which UProperty selector constant, identifies which binary property to check. * Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT. * @return TRUE or FALSE according to the binary Unicode property value for c. * Also FALSE 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. * * @see UProperty * @see u_getIntPropertyValue * @see u_getUnicodeVersion * @stable ICU 2.1 */U_STABLE UBool U_EXPORT2u_hasBinaryProperty(UChar32 c, UProperty which);/** * Check if a code point has the Alphabetic Unicode property. * Same as u_hasBinaryProperty(c, UCHAR_ALPHABETIC). * This is different from u_isalpha! * @param c Code point to test * @return true if the code point has the Alphabetic Unicode property, false otherwise * * @see UCHAR_ALPHABETIC * @see u_isalpha * @see u_hasBinaryProperty * @stable ICU 2.1 */U_STABLE UBool U_EXPORT2u_isUAlphabetic(UChar32 c);/** * Check if a code point has the Lowercase Unicode property. * Same as u_hasBinaryProperty(c, UCHAR_LOWERCASE). * This is different from u_islower! * @param c Code point to test * @return true if the code point has the Lowercase Unicode property, false otherwise * * @see UCHAR_LOWERCASE * @see u_islower * @see u_hasBinaryProperty * @stable ICU 2.1 */U_STABLE UBool U_EXPORT2u_isULowercase(UChar32 c);/** * Check if a code point has the Uppercase Unicode property. * Same as u_hasBinaryProperty(c, UCHAR_UPPERCASE). * This is different from u_isupper! * @param c Code point to test * @return true if the code point has the Uppercase Unicode property, false otherwise * * @see UCHAR_UPPERCASE * @see u_isupper * @see u_hasBinaryProperty * @stable ICU 2.1 */U_STABLE UBool U_EXPORT2u_isUUppercase(UChar32 c);/** * Check if a code point has the White_Space Unicode property. * Same as u_hasBinaryProperty(c, UCHAR_WHITE_SPACE). * This is different from both u_isspace and u_isWhitespace! * * Note: There are several ICU whitespace functions; please see the uchar.h * file documentation for a detailed comparison. * * @param c Code point to test * @return true if the code point has the White_Space Unicode property, false otherwise. * * @see UCHAR_WHITE_SPACE * @see u_isWhitespace * @see u_isspace * @see u_isJavaSpaceChar * @see u_hasBinaryProperty * @stable ICU 2.1 */U_STABLE UBool U_EXPORT2u_isUWhiteSpace(UChar32 c);/** * Get the property value for an enumerated or integer Unicode property for a code point. * Also returns binary and mask property values. * * Unicode, especially in version 3.2, defines many more properties than the * original set in UnicodeData.txt. * * The properties APIs are intended to reflect Unicode properties as defined * in the Unicode Character Database (UCD) and Unicode Technical Reports (UTR). * For details about the properties see http://www.unicode.org/ . * For names of Unicode properties see the UCD file PropertyAliases.txt. * * Sample usage: * UEastAsianWidth ea=(UEastAsianWidth)u_getIntPropertyValue(c, UCHAR_EAST_ASIAN_WIDTH); * UBool b=(UBool)u_getIntPropertyValue(c, UCHAR_IDEOGRAPHIC); * * @param c Code point to test. * @param which UProperty selector constant, identifies which property to check. * Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT * or UCHAR_INT_START<=which<UCHAR_INT_LIMIT * or UCHAR_MASK_START<=which<UCHAR_MASK_LIMIT. * @return Numeric value that is directly the property value or, * for enumerated properties, corresponds to the numeric value of the enumerated
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -