| unictype.h | | unictype.h | |
|
| | | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ | |
| /* Unicode character classification and properties. | | /* Unicode character classification and properties. | |
|
| Copyright (C) 2002, 2005-2010 Free Software Foundation, Inc. | | Copyright (C) 2002, 2005-2014 Free Software Foundation, Inc. | |
| | | | |
| This program is free software: you can redistribute it and/or modify it | | This program is free software: you can redistribute it and/or modify it | |
| under the terms of the GNU Lesser General Public License as published | | under the terms of the GNU Lesser General Public License as published | |
| by the Free Software Foundation; either version 3 of the License, or | | by the Free Software Foundation; either version 3 of the License, or | |
| (at your option) any later version. | | (at your option) any later version. | |
| | | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, | |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| Lesser General Public License for more details. | | Lesser General Public License for more details. | |
| | | | |
| skipping to change at line 67 | | skipping to change at line 68 | |
| } | | } | |
| uc_general_category_t; | | uc_general_category_t; | |
| | | | |
| /* Bits and bit masks denoting General category values. UnicodeData-3.2.0.
html | | /* Bits and bit masks denoting General category values. UnicodeData-3.2.0.
html | |
| says a 32-bit integer will always suffice to represent them. | | says a 32-bit integer will always suffice to represent them. | |
| These bit masks can only be used with the uc_is_general_category_withtab
le | | These bit masks can only be used with the uc_is_general_category_withtab
le | |
| function. */ | | function. */ | |
| enum | | enum | |
| { | | { | |
| UC_CATEGORY_MASK_L = 0x0000001f, | | UC_CATEGORY_MASK_L = 0x0000001f, | |
|
| | | UC_CATEGORY_MASK_LC = 0x00000007, | |
| UC_CATEGORY_MASK_Lu = 0x00000001, | | UC_CATEGORY_MASK_Lu = 0x00000001, | |
| UC_CATEGORY_MASK_Ll = 0x00000002, | | UC_CATEGORY_MASK_Ll = 0x00000002, | |
| UC_CATEGORY_MASK_Lt = 0x00000004, | | UC_CATEGORY_MASK_Lt = 0x00000004, | |
| UC_CATEGORY_MASK_Lm = 0x00000008, | | UC_CATEGORY_MASK_Lm = 0x00000008, | |
| UC_CATEGORY_MASK_Lo = 0x00000010, | | UC_CATEGORY_MASK_Lo = 0x00000010, | |
| UC_CATEGORY_MASK_M = 0x000000e0, | | UC_CATEGORY_MASK_M = 0x000000e0, | |
| UC_CATEGORY_MASK_Mn = 0x00000020, | | UC_CATEGORY_MASK_Mn = 0x00000020, | |
| UC_CATEGORY_MASK_Mc = 0x00000040, | | UC_CATEGORY_MASK_Mc = 0x00000040, | |
| UC_CATEGORY_MASK_Me = 0x00000080, | | UC_CATEGORY_MASK_Me = 0x00000080, | |
| UC_CATEGORY_MASK_N = 0x00000700, | | UC_CATEGORY_MASK_N = 0x00000700, | |
| | | | |
| skipping to change at line 107 | | skipping to change at line 109 | |
| UC_CATEGORY_MASK_C = 0x3e000000, | | UC_CATEGORY_MASK_C = 0x3e000000, | |
| UC_CATEGORY_MASK_Cc = 0x02000000, | | UC_CATEGORY_MASK_Cc = 0x02000000, | |
| UC_CATEGORY_MASK_Cf = 0x04000000, | | UC_CATEGORY_MASK_Cf = 0x04000000, | |
| UC_CATEGORY_MASK_Cs = 0x08000000, | | UC_CATEGORY_MASK_Cs = 0x08000000, | |
| UC_CATEGORY_MASK_Co = 0x10000000, | | UC_CATEGORY_MASK_Co = 0x10000000, | |
| UC_CATEGORY_MASK_Cn = 0x20000000 | | UC_CATEGORY_MASK_Cn = 0x20000000 | |
| }; | | }; | |
| | | | |
| /* Predefined General category values. */ | | /* Predefined General category values. */ | |
| extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_L; | | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_L; | |
|
| | | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_LC
; | |
| extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Lu
; | | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Lu
; | |
| extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Ll
; | | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Ll
; | |
| extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Lt
; | | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Lt
; | |
| extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Lm
; | | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Lm
; | |
| extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Lo
; | | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Lo
; | |
| extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_M; | | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_M; | |
| extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Mn
; | | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Mn
; | |
| extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Mc
; | | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Mc
; | |
| extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Me
; | | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Me
; | |
| extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_N; | | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_N; | |
| | | | |
| skipping to change at line 148 | | skipping to change at line 151 | |
| extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Cc
; | | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Cc
; | |
| extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Cf
; | | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Cf
; | |
| extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Cs
; | | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Cs
; | |
| extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Co
; | | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Co
; | |
| extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Cn
; | | extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Cn
; | |
| /* Non-public. */ | | /* Non-public. */ | |
| extern const uc_general_category_t _UC_CATEGORY_NONE; | | extern const uc_general_category_t _UC_CATEGORY_NONE; | |
| | | | |
| /* Alias names for predefined General category values. */ | | /* Alias names for predefined General category values. */ | |
| #define UC_LETTER UC_CATEGORY_L | | #define UC_LETTER UC_CATEGORY_L | |
|
| | | #define UC_CASED_LETTER UC_CATEGORY_LC | |
| #define UC_UPPERCASE_LETTER UC_CATEGORY_Lu | | #define UC_UPPERCASE_LETTER UC_CATEGORY_Lu | |
| #define UC_LOWERCASE_LETTER UC_CATEGORY_Ll | | #define UC_LOWERCASE_LETTER UC_CATEGORY_Ll | |
| #define UC_TITLECASE_LETTER UC_CATEGORY_Lt | | #define UC_TITLECASE_LETTER UC_CATEGORY_Lt | |
| #define UC_MODIFIER_LETTER UC_CATEGORY_Lm | | #define UC_MODIFIER_LETTER UC_CATEGORY_Lm | |
| #define UC_OTHER_LETTER UC_CATEGORY_Lo | | #define UC_OTHER_LETTER UC_CATEGORY_Lo | |
| #define UC_MARK UC_CATEGORY_M | | #define UC_MARK UC_CATEGORY_M | |
| #define UC_NON_SPACING_MARK UC_CATEGORY_Mn | | #define UC_NON_SPACING_MARK UC_CATEGORY_Mn | |
| #define UC_COMBINING_SPACING_MARK UC_CATEGORY_Mc | | #define UC_COMBINING_SPACING_MARK UC_CATEGORY_Mc | |
| #define UC_ENCLOSING_MARK UC_CATEGORY_Me | | #define UC_ENCLOSING_MARK UC_CATEGORY_Me | |
| #define UC_NUMBER UC_CATEGORY_N | | #define UC_NUMBER UC_CATEGORY_N | |
| | | | |
| skipping to change at line 208 | | skipping to change at line 212 | |
| /* Return the intersection of a general category with the complement of a | | /* Return the intersection of a general category with the complement of a | |
| second general category, as bit masks. | | second general category, as bit masks. | |
| This *does*not* correspond to the intersection with complement, when | | This *does*not* correspond to the intersection with complement, when | |
| viewing the categories as sets of characters. */ | | viewing the categories as sets of characters. */ | |
| extern uc_general_category_t | | extern uc_general_category_t | |
| uc_general_category_and_not (uc_general_category_t category1, | | uc_general_category_and_not (uc_general_category_t category1, | |
| uc_general_category_t category2); | | uc_general_category_t category2); | |
| | | | |
| /* Return the name of a general category. */ | | /* Return the name of a general category. */ | |
| extern const char * | | extern const char * | |
|
| uc_general_category_name (uc_general_category_t category); | | uc_general_category_name (uc_general_category_t category) | |
| | | _UC_ATTRIBUTE_PURE; | |
| | | | |
|
| /* Return the general category given by name, e.g. "Lu". */ | | /* Return the long name of a general category. */ | |
| | | extern const char * | |
| | | uc_general_category_long_name (uc_general_category_t category) | |
| | | _UC_ATTRIBUTE_PURE; | |
| | | | |
| | | /* Return the general category given by name, e.g. "Lu", or by long name, | |
| | | e.g. "Uppercase Letter". */ | |
| extern uc_general_category_t | | extern uc_general_category_t | |
|
| uc_general_category_byname (const char *category_name); | | uc_general_category_byname (const char *category_name) | |
| | | _UC_ATTRIBUTE_PURE; | |
| | | | |
| /* Return the general category of a Unicode character. */ | | /* Return the general category of a Unicode character. */ | |
| extern uc_general_category_t | | extern uc_general_category_t | |
|
| uc_general_category (ucs4_t uc); | | uc_general_category (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_PURE; | |
| | | | |
| /* Test whether a Unicode character belongs to a given category. | | /* Test whether a Unicode character belongs to a given category. | |
| The CATEGORY argument can be the combination of several predefined | | The CATEGORY argument can be the combination of several predefined | |
| general categories. */ | | general categories. */ | |
| extern bool | | extern bool | |
|
| uc_is_general_category (ucs4_t uc, uc_general_category_t category); | | uc_is_general_category (ucs4_t uc, uc_general_category_t category) | |
| | | _UC_ATTRIBUTE_PURE; | |
| /* Likewise. This function uses a big table comprising all categories. */ | | /* Likewise. This function uses a big table comprising all categories. */ | |
| extern bool | | extern bool | |
|
| uc_is_general_category_withtable (ucs4_t uc, uint32_t bitmask); | | uc_is_general_category_withtable (ucs4_t uc, uint32_t bitmask) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | | |
| /* ========================================================================
= */ | | /* ========================================================================
= */ | |
| | | | |
| /* Field 3 of Unicode Character Database: Canonical combining class. */ | | /* Field 3 of Unicode Character Database: Canonical combining class. */ | |
| | | | |
| /* The possible results of uc_combining_class (0..255) are described in | | /* The possible results of uc_combining_class (0..255) are described in | |
| UCD.html. The list here is not definitive; more values can be added | | UCD.html. The list here is not definitive; more values can be added | |
| in future versions. */ | | in future versions. */ | |
| enum | | enum | |
| { | | { | |
| UC_CCC_NR = 0, /* Not Reordered */ | | UC_CCC_NR = 0, /* Not Reordered */ | |
| UC_CCC_OV = 1, /* Overlay */ | | UC_CCC_OV = 1, /* Overlay */ | |
| UC_CCC_NK = 7, /* Nukta */ | | UC_CCC_NK = 7, /* Nukta */ | |
| UC_CCC_KV = 8, /* Kana Voicing */ | | UC_CCC_KV = 8, /* Kana Voicing */ | |
| UC_CCC_VR = 9, /* Virama */ | | UC_CCC_VR = 9, /* Virama */ | |
| UC_CCC_ATBL = 200, /* Attached Below Left */ | | UC_CCC_ATBL = 200, /* Attached Below Left */ | |
| UC_CCC_ATB = 202, /* Attached Below */ | | UC_CCC_ATB = 202, /* Attached Below */ | |
|
| | | UC_CCC_ATA = 214, /* Attached Above */ | |
| UC_CCC_ATAR = 216, /* Attached Above Right */ | | UC_CCC_ATAR = 216, /* Attached Above Right */ | |
| UC_CCC_BL = 218, /* Below Left */ | | UC_CCC_BL = 218, /* Below Left */ | |
| UC_CCC_B = 220, /* Below */ | | UC_CCC_B = 220, /* Below */ | |
| UC_CCC_BR = 222, /* Below Right */ | | UC_CCC_BR = 222, /* Below Right */ | |
| UC_CCC_L = 224, /* Left */ | | UC_CCC_L = 224, /* Left */ | |
| UC_CCC_R = 226, /* Right */ | | UC_CCC_R = 226, /* Right */ | |
| UC_CCC_AL = 228, /* Above Left */ | | UC_CCC_AL = 228, /* Above Left */ | |
| UC_CCC_A = 230, /* Above */ | | UC_CCC_A = 230, /* Above */ | |
| UC_CCC_AR = 232, /* Above Right */ | | UC_CCC_AR = 232, /* Above Right */ | |
| UC_CCC_DB = 233, /* Double Below */ | | UC_CCC_DB = 233, /* Double Below */ | |
| UC_CCC_DA = 234, /* Double Above */ | | UC_CCC_DA = 234, /* Double Above */ | |
| UC_CCC_IS = 240 /* Iota Subscript */ | | UC_CCC_IS = 240 /* Iota Subscript */ | |
| }; | | }; | |
| | | | |
| /* Return the canonical combining class of a Unicode character. */ | | /* Return the canonical combining class of a Unicode character. */ | |
| extern int | | extern int | |
|
| uc_combining_class (ucs4_t uc); | | uc_combining_class (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | | |
| | | /* Return the name of a canonical combining class. */ | |
| | | extern const char * | |
| | | uc_combining_class_name (int ccc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | | |
| | | /* Return the long name of a canonical combining class. */ | |
| | | extern const char * | |
| | | uc_combining_class_long_name (int ccc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | | |
| | | /* Return the canonical combining class given by name, e.g. "BL", or by lon | |
| | | g | |
| | | name, e.g. "Below Left". */ | |
| | | extern int | |
| | | uc_combining_class_byname (const char *ccc_name) | |
| | | _UC_ATTRIBUTE_PURE; | |
| | | | |
| /* ========================================================================
= */ | | /* ========================================================================
= */ | |
| | | | |
|
| /* Field 4 of Unicode Character Database: Bidirectional category. */ | | /* Field 4 of Unicode Character Database: Bidi class. | |
| | | Before Unicode 4.0, this field was called "Bidirectional category". */ | |
| | | | |
| enum | | enum | |
| { | | { | |
| UC_BIDI_L, /* Left-to-Right */ | | UC_BIDI_L, /* Left-to-Right */ | |
| UC_BIDI_LRE, /* Left-to-Right Embedding */ | | UC_BIDI_LRE, /* Left-to-Right Embedding */ | |
| UC_BIDI_LRO, /* Left-to-Right Override */ | | UC_BIDI_LRO, /* Left-to-Right Override */ | |
| UC_BIDI_R, /* Right-to-Left */ | | UC_BIDI_R, /* Right-to-Left */ | |
| UC_BIDI_AL, /* Right-to-Left Arabic */ | | UC_BIDI_AL, /* Right-to-Left Arabic */ | |
| UC_BIDI_RLE, /* Right-to-Left Embedding */ | | UC_BIDI_RLE, /* Right-to-Left Embedding */ | |
| UC_BIDI_RLO, /* Right-to-Left Override */ | | UC_BIDI_RLO, /* Right-to-Left Override */ | |
| | | | |
| skipping to change at line 288 | | skipping to change at line 322 | |
| UC_BIDI_AN, /* Arabic Number */ | | UC_BIDI_AN, /* Arabic Number */ | |
| UC_BIDI_CS, /* Common Number Separator */ | | UC_BIDI_CS, /* Common Number Separator */ | |
| UC_BIDI_NSM, /* Non-Spacing Mark */ | | UC_BIDI_NSM, /* Non-Spacing Mark */ | |
| UC_BIDI_BN, /* Boundary Neutral */ | | UC_BIDI_BN, /* Boundary Neutral */ | |
| UC_BIDI_B, /* Paragraph Separator */ | | UC_BIDI_B, /* Paragraph Separator */ | |
| UC_BIDI_S, /* Segment Separator */ | | UC_BIDI_S, /* Segment Separator */ | |
| UC_BIDI_WS, /* Whitespace */ | | UC_BIDI_WS, /* Whitespace */ | |
| UC_BIDI_ON /* Other Neutral */ | | UC_BIDI_ON /* Other Neutral */ | |
| }; | | }; | |
| | | | |
|
| /* Return the name of a bidirectional category. */ | | /* Return the name of a bidi class. */ | |
| | | extern const char * | |
| | | uc_bidi_class_name (int bidi_class) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | /* Same; obsolete function name. */ | |
| | | extern const char * | |
| | | uc_bidi_category_name (int category) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | | |
| | | /* Return the long name of a bidi class. */ | |
| extern const char * | | extern const char * | |
|
| uc_bidi_category_name (int category); | | uc_bidi_class_long_name (int bidi_class) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | | |
|
| /* Return the bidirectional category given by name, e.g. "LRE". */ | | /* Return the bidi class given by name, e.g. "LRE", or by long name, e.g. | |
| | | "Left-to-Right Embedding". */ | |
| extern int | | extern int | |
|
| uc_bidi_category_byname (const char *category_name); | | uc_bidi_class_byname (const char *bidi_class_name) | |
| | | _UC_ATTRIBUTE_PURE; | |
| | | /* Same; obsolete function name. */ | |
| | | extern int | |
| | | uc_bidi_category_byname (const char *category_name) | |
| | | _UC_ATTRIBUTE_PURE; | |
| | | | |
|
| /* Return the bidirectional category of a Unicode character. */ | | /* Return the bidi class of a Unicode character. */ | |
| | | extern int | |
| | | uc_bidi_class (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | /* Same; obsolete function name. */ | |
| extern int | | extern int | |
|
| uc_bidi_category (ucs4_t uc); | | uc_bidi_category (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | | |
|
| /* Test whether a Unicode character belongs to a given bidirectional | | /* Test whether a Unicode character belongs to a given bidi class. */ | |
| category. */ | | extern bool | |
| | | uc_is_bidi_class (ucs4_t uc, int bidi_class) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | /* Same; obsolete function name. */ | |
| extern bool | | extern bool | |
|
| uc_is_bidi_category (ucs4_t uc, int category); | | uc_is_bidi_category (ucs4_t uc, int category) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | | |
| /* ========================================================================
= */ | | /* ========================================================================
= */ | |
| | | | |
| /* Field 5 of Unicode Character Database: Character decomposition mapping. | | /* Field 5 of Unicode Character Database: Character decomposition mapping. | |
| See "uninorm.h". */ | | See "uninorm.h". */ | |
| | | | |
| /* ========================================================================
= */ | | /* ========================================================================
= */ | |
| | | | |
| /* Field 6 of Unicode Character Database: Decimal digit value. */ | | /* Field 6 of Unicode Character Database: Decimal digit value. */ | |
| | | | |
| /* Return the decimal digit value of a Unicode character. */ | | /* Return the decimal digit value of a Unicode character. */ | |
| extern int | | extern int | |
|
| uc_decimal_value (ucs4_t uc); | | uc_decimal_value (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | | |
| /* ========================================================================
= */ | | /* ========================================================================
= */ | |
| | | | |
| /* Field 7 of Unicode Character Database: Digit value. */ | | /* Field 7 of Unicode Character Database: Digit value. */ | |
| | | | |
| /* Return the digit value of a Unicode character. */ | | /* Return the digit value of a Unicode character. */ | |
| extern int | | extern int | |
|
| uc_digit_value (ucs4_t uc); | | uc_digit_value (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | | |
| /* ========================================================================
= */ | | /* ========================================================================
= */ | |
| | | | |
| /* Field 8 of Unicode Character Database: Numeric value. */ | | /* Field 8 of Unicode Character Database: Numeric value. */ | |
| | | | |
| /* Return the numeric value of a Unicode character. */ | | /* Return the numeric value of a Unicode character. */ | |
| typedef struct | | typedef struct | |
| { | | { | |
| int numerator; | | int numerator; | |
| int denominator; | | int denominator; | |
| } | | } | |
| uc_fraction_t; | | uc_fraction_t; | |
| extern uc_fraction_t | | extern uc_fraction_t | |
|
| uc_numeric_value (ucs4_t uc); | | uc_numeric_value (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | | |
| /* ========================================================================
= */ | | /* ========================================================================
= */ | |
| | | | |
| /* Field 9 of Unicode Character Database: Mirrored. */ | | /* Field 9 of Unicode Character Database: Mirrored. */ | |
| | | | |
| /* Return the mirrored character of a Unicode character UC in *PUC. */ | | /* Return the mirrored character of a Unicode character UC in *PUC. */ | |
| extern bool | | extern bool | |
| uc_mirror_char (ucs4_t uc, ucs4_t *puc); | | uc_mirror_char (ucs4_t uc, ucs4_t *puc); | |
| | | | |
| /* ========================================================================
= */ | | /* ========================================================================
= */ | |
| | | | |
| skipping to change at line 365 | | skipping to change at line 427 | |
| /* Field 11 of Unicode Character Database: ISO 10646 comment. | | /* Field 11 of Unicode Character Database: ISO 10646 comment. | |
| Not available in this library. */ | | Not available in this library. */ | |
| | | | |
| /* ========================================================================
= */ | | /* ========================================================================
= */ | |
| | | | |
| /* Field 12, 13, 14 of Unicode Character Database: Uppercase mapping, | | /* Field 12, 13, 14 of Unicode Character Database: Uppercase mapping, | |
| lowercase mapping, titlecase mapping. See "unicase.h". */ | | lowercase mapping, titlecase mapping. See "unicase.h". */ | |
| | | | |
| /* ========================================================================
= */ | | /* ========================================================================
= */ | |
| | | | |
|
| | | /* Field 2 of the file ArabicShaping.txt in the Unicode Character Database. | |
| | | */ | |
| | | | |
| | | /* Possible joining types. */ | |
| | | enum | |
| | | { | |
| | | UC_JOINING_TYPE_U, /* Non_Joining */ | |
| | | UC_JOINING_TYPE_T, /* Transparent */ | |
| | | UC_JOINING_TYPE_C, /* Join_Causing */ | |
| | | UC_JOINING_TYPE_L, /* Left_Joining */ | |
| | | UC_JOINING_TYPE_R, /* Right_Joining */ | |
| | | UC_JOINING_TYPE_D /* Dual_Joining */ | |
| | | }; | |
| | | | |
| | | /* Return the name of a joining type. */ | |
| | | extern const char * | |
| | | uc_joining_type_name (int joining_type) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | | |
| | | /* Return the long name of a joining type. */ | |
| | | extern const char * | |
| | | uc_joining_type_long_name (int joining_type) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | | |
| | | /* Return the joining type given by name, e.g. "D", or by long name, e.g. | |
| | | "Dual Joining". */ | |
| | | extern int | |
| | | uc_joining_type_byname (const char *joining_type_name) | |
| | | _UC_ATTRIBUTE_PURE; | |
| | | | |
| | | /* Return the joining type of a Unicode character. */ | |
| | | extern int | |
| | | uc_joining_type (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | | |
| | | /* ======================================================================== | |
| | | = */ | |
| | | | |
| | | /* Field 3 of the file ArabicShaping.txt in the Unicode Character Database. | |
| | | */ | |
| | | | |
| | | /* Possible joining groups. | |
| | | This enumeration may be extended in the future. */ | |
| | | enum | |
| | | { | |
| | | UC_JOINING_GROUP_NONE, /* No_Joining_Group */ | |
| | | UC_JOINING_GROUP_AIN, /* Ain */ | |
| | | UC_JOINING_GROUP_ALAPH, /* Alaph */ | |
| | | UC_JOINING_GROUP_ALEF, /* Alef */ | |
| | | UC_JOINING_GROUP_BEH, /* Beh */ | |
| | | UC_JOINING_GROUP_BETH, /* Beth */ | |
| | | UC_JOINING_GROUP_BURUSHASKI_YEH_BARREE, /* Burushaski_Yeh_Barree */ | |
| | | UC_JOINING_GROUP_DAL, /* Dal */ | |
| | | UC_JOINING_GROUP_DALATH_RISH, /* Dalath_Rish */ | |
| | | UC_JOINING_GROUP_E, /* E */ | |
| | | UC_JOINING_GROUP_FARSI_YEH, /* Farsi_Yeh */ | |
| | | UC_JOINING_GROUP_FE, /* Fe */ | |
| | | UC_JOINING_GROUP_FEH, /* Feh */ | |
| | | UC_JOINING_GROUP_FINAL_SEMKATH, /* Final_Semkath */ | |
| | | UC_JOINING_GROUP_GAF, /* Gaf */ | |
| | | UC_JOINING_GROUP_GAMAL, /* Gamal */ | |
| | | UC_JOINING_GROUP_HAH, /* Hah */ | |
| | | UC_JOINING_GROUP_HE, /* He */ | |
| | | UC_JOINING_GROUP_HEH, /* Heh */ | |
| | | UC_JOINING_GROUP_HEH_GOAL, /* Heh_Goal */ | |
| | | UC_JOINING_GROUP_HETH, /* Heth */ | |
| | | UC_JOINING_GROUP_KAF, /* Kaf */ | |
| | | UC_JOINING_GROUP_KAPH, /* Kaph */ | |
| | | UC_JOINING_GROUP_KHAPH, /* Khaph */ | |
| | | UC_JOINING_GROUP_KNOTTED_HEH, /* Knotted_Heh */ | |
| | | UC_JOINING_GROUP_LAM, /* Lam */ | |
| | | UC_JOINING_GROUP_LAMADH, /* Lamadh */ | |
| | | UC_JOINING_GROUP_MEEM, /* Meem */ | |
| | | UC_JOINING_GROUP_MIM, /* Mim */ | |
| | | UC_JOINING_GROUP_NOON, /* Noon */ | |
| | | UC_JOINING_GROUP_NUN, /* Nun */ | |
| | | UC_JOINING_GROUP_NYA, /* Nya */ | |
| | | UC_JOINING_GROUP_PE, /* Pe */ | |
| | | UC_JOINING_GROUP_QAF, /* Qaf */ | |
| | | UC_JOINING_GROUP_QAPH, /* Qaph */ | |
| | | UC_JOINING_GROUP_REH, /* Reh */ | |
| | | UC_JOINING_GROUP_REVERSED_PE, /* Reversed_Pe */ | |
| | | UC_JOINING_GROUP_SAD, /* Sad */ | |
| | | UC_JOINING_GROUP_SADHE, /* Sadhe */ | |
| | | UC_JOINING_GROUP_SEEN, /* Seen */ | |
| | | UC_JOINING_GROUP_SEMKATH, /* Semkath */ | |
| | | UC_JOINING_GROUP_SHIN, /* Shin */ | |
| | | UC_JOINING_GROUP_SWASH_KAF, /* Swash_Kaf */ | |
| | | UC_JOINING_GROUP_SYRIAC_WAW, /* Syriac_Waw */ | |
| | | UC_JOINING_GROUP_TAH, /* Tah */ | |
| | | UC_JOINING_GROUP_TAW, /* Taw */ | |
| | | UC_JOINING_GROUP_TEH_MARBUTA, /* Teh_Marbuta */ | |
| | | UC_JOINING_GROUP_TEH_MARBUTA_GOAL, /* Teh_Marbuta_Goal */ | |
| | | UC_JOINING_GROUP_TETH, /* Teth */ | |
| | | UC_JOINING_GROUP_WAW, /* Waw */ | |
| | | UC_JOINING_GROUP_YEH, /* Yeh */ | |
| | | UC_JOINING_GROUP_YEH_BARREE, /* Yeh_Barree */ | |
| | | UC_JOINING_GROUP_YEH_WITH_TAIL, /* Yeh_With_Tail */ | |
| | | UC_JOINING_GROUP_YUDH, /* Yudh */ | |
| | | UC_JOINING_GROUP_YUDH_HE, /* Yudh_He */ | |
| | | UC_JOINING_GROUP_ZAIN, /* Zain */ | |
| | | UC_JOINING_GROUP_ZHAIN /* Zhain */ | |
| | | }; | |
| | | | |
| | | /* Return the name of a joining group. */ | |
| | | extern const char * | |
| | | uc_joining_group_name (int joining_group) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | | |
| | | /* Return the joining group given by name, e.g. "Teh_Marbuta". */ | |
| | | extern int | |
| | | uc_joining_group_byname (const char *joining_group_name) | |
| | | _UC_ATTRIBUTE_PURE; | |
| | | | |
| | | /* Return the joining group of a Unicode character. */ | |
| | | extern int | |
| | | uc_joining_group (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | | |
| | | /* ======================================================================== | |
| | | = */ | |
| | | | |
| /* Common API for properties. */ | | /* Common API for properties. */ | |
| | | | |
| /* Data type denoting a property. This is not just a number, but rather a | | /* Data type denoting a property. This is not just a number, but rather a | |
| pointer to the test functions, so that programs that use only few of the | | pointer to the test functions, so that programs that use only few of the | |
| properties don't have a link-time dependency towards all the tables. */ | | properties don't have a link-time dependency towards all the tables. */ | |
| typedef struct | | typedef struct | |
| { | | { | |
| bool (*test_fn) (ucs4_t uc); | | bool (*test_fn) (ucs4_t uc); | |
| } | | } | |
| uc_property_t; | | uc_property_t; | |
| | | | |
| skipping to change at line 395 | | skipping to change at line 575 | |
| extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_LOGICAL_OR
DER_EXCEPTION; | | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_LOGICAL_OR
DER_EXCEPTION; | |
| extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_VARIATION_
SELECTOR; | | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_VARIATION_
SELECTOR; | |
| extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_PRIVATE_US
E; | | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_PRIVATE_US
E; | |
| extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_UNASSIGNED
_CODE_VALUE; | | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_UNASSIGNED
_CODE_VALUE; | |
| /* Case. */ | | /* Case. */ | |
| extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_UPPERCASE; | | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_UPPERCASE; | |
| extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_UPPE
RCASE; | | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_UPPE
RCASE; | |
| extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_LOWERCASE; | | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_LOWERCASE; | |
| extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_LOWE
RCASE; | | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_LOWE
RCASE; | |
| extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_TITLECASE; | | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_TITLECASE; | |
|
| | | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CASED; | |
| | | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CASE_IGNOR | |
| | | ABLE; | |
| | | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CHANGES_WH | |
| | | EN_LOWERCASED; | |
| | | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CHANGES_WH | |
| | | EN_UPPERCASED; | |
| | | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CHANGES_WH | |
| | | EN_TITLECASED; | |
| | | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CHANGES_WH | |
| | | EN_CASEFOLDED; | |
| | | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CHANGES_WH | |
| | | EN_CASEMAPPED; | |
| extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_SOFT_DOTTE
D; | | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_SOFT_DOTTE
D; | |
| /* Identifiers. */ | | /* Identifiers. */ | |
| extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_ID_START; | | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_ID_START; | |
| extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_ID_S
TART; | | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_ID_S
TART; | |
| extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_ID_CONTINU
E; | | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_ID_CONTINU
E; | |
| extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_ID_C
ONTINUE; | | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_ID_C
ONTINUE; | |
| extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_XID_START; | | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_XID_START; | |
| extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_XID_CONTIN
UE; | | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_XID_CONTIN
UE; | |
| extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_PATTERN_WH
ITE_SPACE; | | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_PATTERN_WH
ITE_SPACE; | |
| extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_PATTERN_SY
NTAX; | | extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_PATTERN_SY
NTAX; | |
| | | | |
| skipping to change at line 475 | | skipping to change at line 662 | |
| /* Return the property given by name, e.g. "White space". */ | | /* Return the property given by name, e.g. "White space". */ | |
| extern uc_property_t | | extern uc_property_t | |
| uc_property_byname (const char *property_name); | | uc_property_byname (const char *property_name); | |
| | | | |
| /* Test whether a property is valid. */ | | /* Test whether a property is valid. */ | |
| #define uc_property_is_valid(property) ((property).test_fn != NULL) | | #define uc_property_is_valid(property) ((property).test_fn != NULL) | |
| | | | |
| /* Test whether a Unicode character has a given property. */ | | /* Test whether a Unicode character has a given property. */ | |
| extern bool | | extern bool | |
| uc_is_property (ucs4_t uc, uc_property_t property); | | uc_is_property (ucs4_t uc, uc_property_t property); | |
|
| extern bool uc_is_property_white_space (ucs4_t uc); | | extern bool uc_is_property_white_space (ucs4_t uc) | |
| extern bool uc_is_property_alphabetic (ucs4_t uc); | | _UC_ATTRIBUTE_CONST; | |
| extern bool uc_is_property_other_alphabetic (ucs4_t uc); | | extern bool uc_is_property_alphabetic (ucs4_t uc) | |
| extern bool uc_is_property_not_a_character (ucs4_t uc); | | _UC_ATTRIBUTE_CONST; | |
| extern bool uc_is_property_default_ignorable_code_point (ucs4_t uc); | | extern bool uc_is_property_other_alphabetic (ucs4_t uc) | |
| extern bool uc_is_property_other_default_ignorable_code_point (ucs4_t uc); | | _UC_ATTRIBUTE_CONST; | |
| extern bool uc_is_property_deprecated (ucs4_t uc); | | extern bool uc_is_property_not_a_character (ucs4_t uc) | |
| extern bool uc_is_property_logical_order_exception (ucs4_t uc); | | _UC_ATTRIBUTE_CONST; | |
| extern bool uc_is_property_variation_selector (ucs4_t uc); | | extern bool uc_is_property_default_ignorable_code_point (ucs4_t uc) | |
| extern bool uc_is_property_private_use (ucs4_t uc); | | _UC_ATTRIBUTE_CONST; | |
| extern bool uc_is_property_unassigned_code_value (ucs4_t uc); | | extern bool uc_is_property_other_default_ignorable_code_point (ucs4_t uc) | |
| extern bool uc_is_property_uppercase (ucs4_t uc); | | _UC_ATTRIBUTE_CONST; | |
| extern bool uc_is_property_other_uppercase (ucs4_t uc); | | extern bool uc_is_property_deprecated (ucs4_t uc) | |
| extern bool uc_is_property_lowercase (ucs4_t uc); | | _UC_ATTRIBUTE_CONST; | |
| extern bool uc_is_property_other_lowercase (ucs4_t uc); | | extern bool uc_is_property_logical_order_exception (ucs4_t uc) | |
| extern bool uc_is_property_titlecase (ucs4_t uc); | | _UC_ATTRIBUTE_CONST; | |
| extern bool uc_is_property_soft_dotted (ucs4_t uc); | | extern bool uc_is_property_variation_selector (ucs4_t uc) | |
| extern bool uc_is_property_id_start (ucs4_t uc); | | _UC_ATTRIBUTE_CONST; | |
| extern bool uc_is_property_other_id_start (ucs4_t uc); | | extern bool uc_is_property_private_use (ucs4_t uc) | |
| extern bool uc_is_property_id_continue (ucs4_t uc); | | _UC_ATTRIBUTE_CONST; | |
| extern bool uc_is_property_other_id_continue (ucs4_t uc); | | extern bool uc_is_property_unassigned_code_value (ucs4_t uc) | |
| extern bool uc_is_property_xid_start (ucs4_t uc); | | _UC_ATTRIBUTE_CONST; | |
| extern bool uc_is_property_xid_continue (ucs4_t uc); | | extern bool uc_is_property_uppercase (ucs4_t uc) | |
| extern bool uc_is_property_pattern_white_space (ucs4_t uc); | | _UC_ATTRIBUTE_CONST; | |
| extern bool uc_is_property_pattern_syntax (ucs4_t uc); | | extern bool uc_is_property_other_uppercase (ucs4_t uc) | |
| extern bool uc_is_property_join_control (ucs4_t uc); | | _UC_ATTRIBUTE_CONST; | |
| extern bool uc_is_property_grapheme_base (ucs4_t uc); | | extern bool uc_is_property_lowercase (ucs4_t uc) | |
| extern bool uc_is_property_grapheme_extend (ucs4_t uc); | | _UC_ATTRIBUTE_CONST; | |
| extern bool uc_is_property_other_grapheme_extend (ucs4_t uc); | | extern bool uc_is_property_other_lowercase (ucs4_t uc) | |
| extern bool uc_is_property_grapheme_link (ucs4_t uc); | | _UC_ATTRIBUTE_CONST; | |
| extern bool uc_is_property_bidi_control (ucs4_t uc); | | extern bool uc_is_property_titlecase (ucs4_t uc) | |
| extern bool uc_is_property_bidi_left_to_right (ucs4_t uc); | | _UC_ATTRIBUTE_CONST; | |
| extern bool uc_is_property_bidi_hebrew_right_to_left (ucs4_t uc); | | extern bool uc_is_property_cased (ucs4_t uc) | |
| extern bool uc_is_property_bidi_arabic_right_to_left (ucs4_t uc); | | _UC_ATTRIBUTE_CONST; | |
| extern bool uc_is_property_bidi_european_digit (ucs4_t uc); | | extern bool uc_is_property_case_ignorable (ucs4_t uc) | |
| extern bool uc_is_property_bidi_eur_num_separator (ucs4_t uc); | | _UC_ATTRIBUTE_CONST; | |
| extern bool uc_is_property_bidi_eur_num_terminator (ucs4_t uc); | | extern bool uc_is_property_changes_when_lowercased (ucs4_t uc) | |
| extern bool uc_is_property_bidi_arabic_digit (ucs4_t uc); | | _UC_ATTRIBUTE_CONST; | |
| extern bool uc_is_property_bidi_common_separator (ucs4_t uc); | | extern bool uc_is_property_changes_when_uppercased (ucs4_t uc) | |
| extern bool uc_is_property_bidi_block_separator (ucs4_t uc); | | _UC_ATTRIBUTE_CONST; | |
| extern bool uc_is_property_bidi_segment_separator (ucs4_t uc); | | extern bool uc_is_property_changes_when_titlecased (ucs4_t uc) | |
| extern bool uc_is_property_bidi_whitespace (ucs4_t uc); | | _UC_ATTRIBUTE_CONST; | |
| extern bool uc_is_property_bidi_non_spacing_mark (ucs4_t uc); | | extern bool uc_is_property_changes_when_casefolded (ucs4_t uc) | |
| extern bool uc_is_property_bidi_boundary_neutral (ucs4_t uc); | | _UC_ATTRIBUTE_CONST; | |
| extern bool uc_is_property_bidi_pdf (ucs4_t uc); | | extern bool uc_is_property_changes_when_casemapped (ucs4_t uc) | |
| extern bool uc_is_property_bidi_embedding_or_override (ucs4_t uc); | | _UC_ATTRIBUTE_CONST; | |
| extern bool uc_is_property_bidi_other_neutral (ucs4_t uc); | | extern bool uc_is_property_soft_dotted (ucs4_t uc) | |
| extern bool uc_is_property_hex_digit (ucs4_t uc); | | _UC_ATTRIBUTE_CONST; | |
| extern bool uc_is_property_ascii_hex_digit (ucs4_t uc); | | extern bool uc_is_property_id_start (ucs4_t uc) | |
| extern bool uc_is_property_ideographic (ucs4_t uc); | | _UC_ATTRIBUTE_CONST; | |
| extern bool uc_is_property_unified_ideograph (ucs4_t uc); | | extern bool uc_is_property_other_id_start (ucs4_t uc) | |
| extern bool uc_is_property_radical (ucs4_t uc); | | _UC_ATTRIBUTE_CONST; | |
| extern bool uc_is_property_ids_binary_operator (ucs4_t uc); | | extern bool uc_is_property_id_continue (ucs4_t uc) | |
| extern bool uc_is_property_ids_trinary_operator (ucs4_t uc); | | _UC_ATTRIBUTE_CONST; | |
| extern bool uc_is_property_zero_width (ucs4_t uc); | | extern bool uc_is_property_other_id_continue (ucs4_t uc) | |
| extern bool uc_is_property_space (ucs4_t uc); | | _UC_ATTRIBUTE_CONST; | |
| extern bool uc_is_property_non_break (ucs4_t uc); | | extern bool uc_is_property_xid_start (ucs4_t uc) | |
| extern bool uc_is_property_iso_control (ucs4_t uc); | | _UC_ATTRIBUTE_CONST; | |
| extern bool uc_is_property_format_control (ucs4_t uc); | | extern bool uc_is_property_xid_continue (ucs4_t uc) | |
| extern bool uc_is_property_dash (ucs4_t uc); | | _UC_ATTRIBUTE_CONST; | |
| extern bool uc_is_property_hyphen (ucs4_t uc); | | extern bool uc_is_property_pattern_white_space (ucs4_t uc) | |
| extern bool uc_is_property_punctuation (ucs4_t uc); | | _UC_ATTRIBUTE_CONST; | |
| extern bool uc_is_property_line_separator (ucs4_t uc); | | extern bool uc_is_property_pattern_syntax (ucs4_t uc) | |
| extern bool uc_is_property_paragraph_separator (ucs4_t uc); | | _UC_ATTRIBUTE_CONST; | |
| extern bool uc_is_property_quotation_mark (ucs4_t uc); | | extern bool uc_is_property_join_control (ucs4_t uc) | |
| extern bool uc_is_property_sentence_terminal (ucs4_t uc); | | _UC_ATTRIBUTE_CONST; | |
| extern bool uc_is_property_terminal_punctuation (ucs4_t uc); | | extern bool uc_is_property_grapheme_base (ucs4_t uc) | |
| extern bool uc_is_property_currency_symbol (ucs4_t uc); | | _UC_ATTRIBUTE_CONST; | |
| extern bool uc_is_property_math (ucs4_t uc); | | extern bool uc_is_property_grapheme_extend (ucs4_t uc) | |
| extern bool uc_is_property_other_math (ucs4_t uc); | | _UC_ATTRIBUTE_CONST; | |
| extern bool uc_is_property_paired_punctuation (ucs4_t uc); | | extern bool uc_is_property_other_grapheme_extend (ucs4_t uc) | |
| extern bool uc_is_property_left_of_pair (ucs4_t uc); | | _UC_ATTRIBUTE_CONST; | |
| extern bool uc_is_property_combining (ucs4_t uc); | | extern bool uc_is_property_grapheme_link (ucs4_t uc) | |
| extern bool uc_is_property_composite (ucs4_t uc); | | _UC_ATTRIBUTE_CONST; | |
| extern bool uc_is_property_decimal_digit (ucs4_t uc); | | extern bool uc_is_property_bidi_control (ucs4_t uc) | |
| extern bool uc_is_property_numeric (ucs4_t uc); | | _UC_ATTRIBUTE_CONST; | |
| extern bool uc_is_property_diacritic (ucs4_t uc); | | extern bool uc_is_property_bidi_left_to_right (ucs4_t uc) | |
| extern bool uc_is_property_extender (ucs4_t uc); | | _UC_ATTRIBUTE_CONST; | |
| extern bool uc_is_property_ignorable_control (ucs4_t uc); | | extern bool uc_is_property_bidi_hebrew_right_to_left (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_bidi_arabic_right_to_left (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_bidi_european_digit (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_bidi_eur_num_separator (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_bidi_eur_num_terminator (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_bidi_arabic_digit (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_bidi_common_separator (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_bidi_block_separator (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_bidi_segment_separator (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_bidi_whitespace (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_bidi_non_spacing_mark (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_bidi_boundary_neutral (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_bidi_pdf (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_bidi_embedding_or_override (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_bidi_other_neutral (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_hex_digit (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_ascii_hex_digit (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_ideographic (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_unified_ideograph (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_radical (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_ids_binary_operator (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_ids_trinary_operator (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_zero_width (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_space (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_non_break (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_iso_control (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_format_control (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_dash (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_hyphen (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_punctuation (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_line_separator (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_paragraph_separator (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_quotation_mark (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_sentence_terminal (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_terminal_punctuation (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_currency_symbol (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_math (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_other_math (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_paired_punctuation (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_left_of_pair (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_combining (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_composite (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_decimal_digit (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_numeric (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_diacritic (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_extender (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | extern bool uc_is_property_ignorable_control (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | | |
| /* ========================================================================
= */ | | /* ========================================================================
= */ | |
| | | | |
| /* Subdivision of the Unicode characters into scripts. */ | | /* Subdivision of the Unicode characters into scripts. */ | |
| | | | |
| typedef struct | | typedef struct | |
| { | | { | |
| unsigned int code : 21; | | unsigned int code : 21; | |
| unsigned int start : 1; | | unsigned int start : 1; | |
| unsigned int end : 1; | | unsigned int end : 1; | |
| | | | |
| skipping to change at line 576 | | skipping to change at line 856 | |
| typedef struct | | typedef struct | |
| { | | { | |
| unsigned int nintervals; | | unsigned int nintervals; | |
| const uc_interval_t *intervals; | | const uc_interval_t *intervals; | |
| const char *name; | | const char *name; | |
| } | | } | |
| uc_script_t; | | uc_script_t; | |
| | | | |
| /* Return the script of a Unicode character. */ | | /* Return the script of a Unicode character. */ | |
| extern const uc_script_t * | | extern const uc_script_t * | |
|
| uc_script (ucs4_t uc); | | uc_script (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | | |
| /* Return the script given by name, e.g. "HAN". */ | | /* Return the script given by name, e.g. "HAN". */ | |
| extern const uc_script_t * | | extern const uc_script_t * | |
|
| uc_script_byname (const char *script_name); | | uc_script_byname (const char *script_name) | |
| | | _UC_ATTRIBUTE_PURE; | |
| | | | |
| /* Test whether a Unicode character belongs to a given script. */ | | /* Test whether a Unicode character belongs to a given script. */ | |
| extern bool | | extern bool | |
|
| uc_is_script (ucs4_t uc, const uc_script_t *script); | | uc_is_script (ucs4_t uc, const uc_script_t *script) | |
| | | _UC_ATTRIBUTE_PURE; | |
| | | | |
| /* Get the list of all scripts. */ | | /* Get the list of all scripts. */ | |
| extern void | | extern void | |
| uc_all_scripts (const uc_script_t **scripts, size_t *count); | | uc_all_scripts (const uc_script_t **scripts, size_t *count); | |
| | | | |
| /* ========================================================================
= */ | | /* ========================================================================
= */ | |
| | | | |
| /* Subdivision of the Unicode character range into blocks. */ | | /* Subdivision of the Unicode character range into blocks. */ | |
| | | | |
| typedef struct | | typedef struct | |
| { | | { | |
| ucs4_t start; | | ucs4_t start; | |
| ucs4_t end; | | ucs4_t end; | |
| const char *name; | | const char *name; | |
| } | | } | |
| uc_block_t; | | uc_block_t; | |
| | | | |
| /* Return the block a character belongs to. */ | | /* Return the block a character belongs to. */ | |
| extern const uc_block_t * | | extern const uc_block_t * | |
|
| uc_block (ucs4_t uc); | | uc_block (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | | |
| /* Test whether a Unicode character belongs to a given block. */ | | /* Test whether a Unicode character belongs to a given block. */ | |
| extern bool | | extern bool | |
|
| uc_is_block (ucs4_t uc, const uc_block_t *block); | | uc_is_block (ucs4_t uc, const uc_block_t *block) | |
| | | _UC_ATTRIBUTE_PURE; | |
| | | | |
| /* Get the list of all blocks. */ | | /* Get the list of all blocks. */ | |
| extern void | | extern void | |
| uc_all_blocks (const uc_block_t **blocks, size_t *count); | | uc_all_blocks (const uc_block_t **blocks, size_t *count); | |
| | | | |
| /* ========================================================================
= */ | | /* ========================================================================
= */ | |
| | | | |
| /* Properties taken from language standards. */ | | /* Properties taken from language standards. */ | |
| | | | |
| /* Test whether a Unicode character is considered whitespace in ISO C 99.
*/ | | /* Test whether a Unicode character is considered whitespace in ISO C 99.
*/ | |
| extern bool | | extern bool | |
|
| uc_is_c_whitespace (ucs4_t uc); | | uc_is_c_whitespace (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | | |
| /* Test whether a Unicode character is considered whitespace in Java. */ | | /* Test whether a Unicode character is considered whitespace in Java. */ | |
| extern bool | | extern bool | |
|
| uc_is_java_whitespace (ucs4_t uc); | | uc_is_java_whitespace (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | | |
| enum | | enum | |
| { | | { | |
| UC_IDENTIFIER_START, /* valid as first or subsequent character */ | | UC_IDENTIFIER_START, /* valid as first or subsequent character */ | |
| UC_IDENTIFIER_VALID, /* valid as subsequent character only */ | | UC_IDENTIFIER_VALID, /* valid as subsequent character only */ | |
| UC_IDENTIFIER_INVALID, /* not valid */ | | UC_IDENTIFIER_INVALID, /* not valid */ | |
| UC_IDENTIFIER_IGNORABLE /* ignorable (Java only) */ | | UC_IDENTIFIER_IGNORABLE /* ignorable (Java only) */ | |
| }; | | }; | |
| | | | |
| /* Return the categorization of a Unicode character w.r.t. the ISO C 99 | | /* Return the categorization of a Unicode character w.r.t. the ISO C 99 | |
| identifier syntax. */ | | identifier syntax. */ | |
| extern int | | extern int | |
|
| uc_c_ident_category (ucs4_t uc); | | uc_c_ident_category (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | | |
| /* Return the categorization of a Unicode character w.r.t. the Java | | /* Return the categorization of a Unicode character w.r.t. the Java | |
| identifier syntax. */ | | identifier syntax. */ | |
| extern int | | extern int | |
|
| uc_java_ident_category (ucs4_t uc); | | uc_java_ident_category (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | | |
| /* ========================================================================
= */ | | /* ========================================================================
= */ | |
| | | | |
| /* Like ISO C <ctype.h> and <wctype.h>. These functions are deprecated, | | /* Like ISO C <ctype.h> and <wctype.h>. These functions are deprecated, | |
| because this set of functions was designed with ASCII in mind and cannot | | because this set of functions was designed with ASCII in mind and cannot | |
| reflect the more diverse reality of the Unicode character set. But they | | reflect the more diverse reality of the Unicode character set. But they | |
| can be a quick-and-dirty porting aid when migrating from wchar_t APIs | | can be a quick-and-dirty porting aid when migrating from wchar_t APIs | |
| to Unicode strings. */ | | to Unicode strings. */ | |
| | | | |
| /* Test for any character for which 'uc_is_alpha' or 'uc_is_digit' is true.
*/ | | /* Test for any character for which 'uc_is_alpha' or 'uc_is_digit' is true.
*/ | |
| extern bool | | extern bool | |
|
| uc_is_alnum (ucs4_t uc); | | uc_is_alnum (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | | |
| /* Test for any character for which 'uc_is_upper' or 'uc_is_lower' is true, | | /* Test for any character for which 'uc_is_upper' or 'uc_is_lower' is true, | |
| or any character that is one of a locale-specific set of characters for | | or any character that is one of a locale-specific set of characters for | |
| which none of 'uc_is_cntrl', 'uc_is_digit', 'uc_is_punct', or 'uc_is_spa
ce' | | which none of 'uc_is_cntrl', 'uc_is_digit', 'uc_is_punct', or 'uc_is_spa
ce' | |
| is true. */ | | is true. */ | |
| extern bool | | extern bool | |
|
| uc_is_alpha (ucs4_t uc); | | uc_is_alpha (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | | |
| /* Test for any control character. */ | | /* Test for any control character. */ | |
| extern bool | | extern bool | |
|
| uc_is_cntrl (ucs4_t uc); | | uc_is_cntrl (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | | |
| /* Test for any character that corresponds to a decimal-digit character. *
/ | | /* Test for any character that corresponds to a decimal-digit character. *
/ | |
| extern bool | | extern bool | |
|
| uc_is_digit (ucs4_t uc); | | uc_is_digit (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | | |
| /* Test for any character for which 'uc_is_print' is true and 'uc_is_space' | | /* Test for any character for which 'uc_is_print' is true and 'uc_is_space' | |
| is false. */ | | is false. */ | |
| extern bool | | extern bool | |
|
| uc_is_graph (ucs4_t uc); | | uc_is_graph (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | | |
| /* Test for any character that corresponds to a lowercase letter or is one | | /* Test for any character that corresponds to a lowercase letter or is one | |
| of a locale-specific set of characters for which none of 'uc_is_cntrl', | | of a locale-specific set of characters for which none of 'uc_is_cntrl', | |
| 'uc_is_digit', 'uc_is_punct', or 'uc_is_space' is true. */ | | 'uc_is_digit', 'uc_is_punct', or 'uc_is_space' is true. */ | |
| extern bool | | extern bool | |
|
| uc_is_lower (ucs4_t uc); | | uc_is_lower (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | | |
| /* Test for any printing character. */ | | /* Test for any printing character. */ | |
| extern bool | | extern bool | |
|
| uc_is_print (ucs4_t uc); | | uc_is_print (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | | |
| /* Test for any printing character that is one of a locale-specific set of | | /* Test for any printing character that is one of a locale-specific set of | |
| characters for which neither 'uc_is_space' nor 'uc_is_alnum' is true. *
/ | | characters for which neither 'uc_is_space' nor 'uc_is_alnum' is true. *
/ | |
| extern bool | | extern bool | |
|
| uc_is_punct (ucs4_t uc); | | uc_is_punct (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | | |
| /* Test for any character that corresponds to a locale-specific set of | | /* Test for any character that corresponds to a locale-specific set of | |
| characters for which none of 'uc_is_alnum', 'uc_is_graph', or 'uc_is_pun
ct' | | characters for which none of 'uc_is_alnum', 'uc_is_graph', or 'uc_is_pun
ct' | |
| is true. */ | | is true. */ | |
| extern bool | | extern bool | |
|
| uc_is_space (ucs4_t uc); | | uc_is_space (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | | |
| /* Test for any character that corresponds to an uppercase letter or is one | | /* Test for any character that corresponds to an uppercase letter or is one | |
| of a locale-specific set of character for which none of 'uc_is_cntrl', | | of a locale-specific set of character for which none of 'uc_is_cntrl', | |
| 'uc_is_digit', 'uc_is_punct', or 'uc_is_space' is true. */ | | 'uc_is_digit', 'uc_is_punct', or 'uc_is_space' is true. */ | |
| extern bool | | extern bool | |
|
| uc_is_upper (ucs4_t uc); | | uc_is_upper (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | | |
| /* Test for any character that corresponds to a hexadecimal-digit | | /* Test for any character that corresponds to a hexadecimal-digit | |
| character. */ | | character. */ | |
| extern bool | | extern bool | |
|
| uc_is_xdigit (ucs4_t uc); | | uc_is_xdigit (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | | |
| /* GNU extension. */ | | /* GNU extension. */ | |
| /* Test for any character that corresponds to a standard blank character or | | /* Test for any character that corresponds to a standard blank character or | |
| a locale-specific set of characters for which 'uc_is_alnum' is false. *
/ | | a locale-specific set of characters for which 'uc_is_alnum' is false. *
/ | |
| extern bool | | extern bool | |
|
| uc_is_blank (ucs4_t uc); | | uc_is_blank (ucs4_t uc) | |
| | | _UC_ATTRIBUTE_CONST; | |
| | | | |
| /* ========================================================================
= */ | | /* ========================================================================
= */ | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #endif /* _UNICTYPE_H */ | | #endif /* _UNICTYPE_H */ | |
| | | | |
End of changes. 49 change blocks. |
| 121 lines changed or deleted | | 433 lines changed or added | |
|
| unistr.h | | unistr.h | |
|
| | | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ | |
| /* Elementary Unicode string functions. | | /* Elementary Unicode string functions. | |
|
| Copyright (C) 2001-2002, 2005-2010 Free Software Foundation, Inc. | | Copyright (C) 2001-2002, 2005-2014 Free Software Foundation, Inc. | |
| | | | |
| This program is free software: you can redistribute it and/or modify it | | This program is free software: you can redistribute it and/or modify it | |
| under the terms of the GNU Lesser General Public License as published | | under the terms of the GNU Lesser General Public License as published | |
| by the Free Software Foundation; either version 3 of the License, or | | by the Free Software Foundation; either version 3 of the License, or | |
| (at your option) any later version. | | (at your option) any later version. | |
| | | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, | |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| Lesser General Public License for more details. | | Lesser General Public License for more details. | |
| | | | |
| skipping to change at line 70 | | skipping to change at line 71 | |
| it is put in resultbuf, and resultbuf is returned. Otherwise, a freshly | | it is put in resultbuf, and resultbuf is returned. Otherwise, a freshly | |
| allocated string is returned. In both cases, *lengthp is set to the | | allocated string is returned. In both cases, *lengthp is set to the | |
| length (number of units) of the returned string. In case of error, | | length (number of units) of the returned string. In case of error, | |
| NULL is returned and errno is set. */ | | NULL is returned and errno is set. */ | |
| | | | |
| /* Elementary string checks. */ | | /* Elementary string checks. */ | |
| | | | |
| /* Check whether an UTF-8 string is well-formed. | | /* Check whether an UTF-8 string is well-formed. | |
| Return NULL if valid, or a pointer to the first invalid unit otherwise.
*/ | | Return NULL if valid, or a pointer to the first invalid unit otherwise.
*/ | |
| extern const uint8_t * | | extern const uint8_t * | |
|
| u8_check (const uint8_t *s, size_t n); | | u8_check (const uint8_t *s, size_t n) | |
| | | _UC_ATTRIBUTE_PURE; | |
| | | | |
| /* Check whether an UTF-16 string is well-formed. | | /* Check whether an UTF-16 string is well-formed. | |
| Return NULL if valid, or a pointer to the first invalid unit otherwise.
*/ | | Return NULL if valid, or a pointer to the first invalid unit otherwise.
*/ | |
| extern const uint16_t * | | extern const uint16_t * | |
|
| u16_check (const uint16_t *s, size_t n); | | u16_check (const uint16_t *s, size_t n) | |
| | | _UC_ATTRIBUTE_PURE; | |
| | | | |
| /* Check whether an UCS-4 string is well-formed. | | /* Check whether an UCS-4 string is well-formed. | |
| Return NULL if valid, or a pointer to the first invalid unit otherwise.
*/ | | Return NULL if valid, or a pointer to the first invalid unit otherwise.
*/ | |
| extern const uint32_t * | | extern const uint32_t * | |
|
| u32_check (const uint32_t *s, size_t n); | | u32_check (const uint32_t *s, size_t n) | |
| | | _UC_ATTRIBUTE_PURE; | |
| | | | |
| /* Elementary string conversions. */ | | /* Elementary string conversions. */ | |
| | | | |
| /* Convert an UTF-8 string to an UTF-16 string. */ | | /* Convert an UTF-8 string to an UTF-16 string. */ | |
| extern uint16_t * | | extern uint16_t * | |
| u8_to_u16 (const uint8_t *s, size_t n, uint16_t *resultbuf, | | u8_to_u16 (const uint8_t *s, size_t n, uint16_t *resultbuf, | |
| size_t *lengthp); | | size_t *lengthp); | |
| | | | |
| /* Convert an UTF-8 string to an UCS-4 string. */ | | /* Convert an UTF-8 string to an UCS-4 string. */ | |
| extern uint32_t * | | extern uint32_t * | |
| | | | |
| skipping to change at line 121 | | skipping to change at line 125 | |
| u32_to_u16 (const uint32_t *s, size_t n, uint16_t *resultbuf, | | u32_to_u16 (const uint32_t *s, size_t n, uint16_t *resultbuf, | |
| size_t *lengthp); | | size_t *lengthp); | |
| | | | |
| /* Elementary string functions. */ | | /* Elementary string functions. */ | |
| | | | |
| /* Return the length (number of units) of the first character in S, which i
s | | /* Return the length (number of units) of the first character in S, which i
s | |
| no longer than N. Return 0 if it is the NUL character. Return -1 upon | | no longer than N. Return 0 if it is the NUL character. Return -1 upon | |
| failure. */ | | failure. */ | |
| /* Similar to mblen(), except that s must not be NULL. */ | | /* Similar to mblen(), except that s must not be NULL. */ | |
| extern int | | extern int | |
|
| u8_mblen (const uint8_t *s, size_t n); | | u8_mblen (const uint8_t *s, size_t n) | |
| | | _UC_ATTRIBUTE_PURE; | |
| extern int | | extern int | |
|
| u16_mblen (const uint16_t *s, size_t n); | | u16_mblen (const uint16_t *s, size_t n) | |
| | | _UC_ATTRIBUTE_PURE; | |
| extern int | | extern int | |
|
| u32_mblen (const uint32_t *s, size_t n); | | u32_mblen (const uint32_t *s, size_t n) | |
| | | _UC_ATTRIBUTE_PURE; | |
| | | | |
| /* Return the length (number of units) of the first character in S, putting | | /* Return the length (number of units) of the first character in S, putting | |
| its 'ucs4_t' representation in *PUC. Upon failure, *PUC is set to 0xfff
d, | | its 'ucs4_t' representation in *PUC. Upon failure, *PUC is set to 0xfff
d, | |
| and an appropriate number of units is returned. | | and an appropriate number of units is returned. | |
| The number of available units, N, must be > 0. */ | | The number of available units, N, must be > 0. */ | |
| /* Similar to mbtowc(), except that puc and s must not be NULL, n must be >
0, | | /* Similar to mbtowc(), except that puc and s must not be NULL, n must be >
0, | |
| and the NUL character is not treated specially. */ | | and the NUL character is not treated specially. */ | |
| /* The variants with _safe suffix are safe, even if the library is compiled | | /* The variants with _safe suffix are safe, even if the library is compiled | |
| without --enable-safety. */ | | without --enable-safety. */ | |
| | | | |
| | | | |
| skipping to change at line 402 | | skipping to change at line 409 | |
| extern uint8_t * | | extern uint8_t * | |
| u8_set (uint8_t *s, ucs4_t uc, size_t n); | | u8_set (uint8_t *s, ucs4_t uc, size_t n); | |
| extern uint16_t * | | extern uint16_t * | |
| u16_set (uint16_t *s, ucs4_t uc, size_t n); | | u16_set (uint16_t *s, ucs4_t uc, size_t n); | |
| extern uint32_t * | | extern uint32_t * | |
| u32_set (uint32_t *s, ucs4_t uc, size_t n); | | u32_set (uint32_t *s, ucs4_t uc, size_t n); | |
| | | | |
| /* Compare S1 and S2, each of length N. */ | | /* Compare S1 and S2, each of length N. */ | |
| /* Similar to memcmp(). */ | | /* Similar to memcmp(). */ | |
| extern int | | extern int | |
|
| u8_cmp (const uint8_t *s1, const uint8_t *s2, size_t n); | | u8_cmp (const uint8_t *s1, const uint8_t *s2, size_t n) | |
| | | _UC_ATTRIBUTE_PURE; | |
| extern int | | extern int | |
|
| u16_cmp (const uint16_t *s1, const uint16_t *s2, size_t n); | | u16_cmp (const uint16_t *s1, const uint16_t *s2, size_t n) | |
| | | _UC_ATTRIBUTE_PURE; | |
| extern int | | extern int | |
|
| u32_cmp (const uint32_t *s1, const uint32_t *s2, size_t n); | | u32_cmp (const uint32_t *s1, const uint32_t *s2, size_t n) | |
| | | _UC_ATTRIBUTE_PURE; | |
| | | | |
| /* Compare S1 and S2. */ | | /* Compare S1 and S2. */ | |
| /* Similar to the gnulib function memcmp2(). */ | | /* Similar to the gnulib function memcmp2(). */ | |
| extern int | | extern int | |
|
| u8_cmp2 (const uint8_t *s1, size_t n1, const uint8_t *s2, size_t n2) | | u8_cmp2 (const uint8_t *s1, size_t n1, const uint8_t *s2, size_t n2) | |
| ; | | _UC_ATTRIBUTE_PURE; | |
| extern int | | extern int | |
|
| u16_cmp2 (const uint16_t *s1, size_t n1, const uint16_t *s2, size_t | | u16_cmp2 (const uint16_t *s1, size_t n1, const uint16_t *s2, size_t | |
| n2); | | n2) | |
| | | _UC_ATTRIBUTE_PURE; | |
| extern int | | extern int | |
|
| u32_cmp2 (const uint32_t *s1, size_t n1, const uint32_t *s2, size_t | | u32_cmp2 (const uint32_t *s1, size_t n1, const uint32_t *s2, size_t | |
| n2); | | n2) | |
| | | _UC_ATTRIBUTE_PURE; | |
| | | | |
| /* Search the string at S for UC. */ | | /* Search the string at S for UC. */ | |
| /* Similar to memchr(). */ | | /* Similar to memchr(). */ | |
| extern uint8_t * | | extern uint8_t * | |
|
| u8_chr (const uint8_t *s, size_t n, ucs4_t uc); | | u8_chr (const uint8_t *s, size_t n, ucs4_t uc) | |
| | | _UC_ATTRIBUTE_PURE; | |
| extern uint16_t * | | extern uint16_t * | |
|
| u16_chr (const uint16_t *s, size_t n, ucs4_t uc); | | u16_chr (const uint16_t *s, size_t n, ucs4_t uc) | |
| | | _UC_ATTRIBUTE_PURE; | |
| extern uint32_t * | | extern uint32_t * | |
|
| u32_chr (const uint32_t *s, size_t n, ucs4_t uc); | | u32_chr (const uint32_t *s, size_t n, ucs4_t uc) | |
| | | _UC_ATTRIBUTE_PURE; | |
| | | | |
| /* Count the number of Unicode characters in the N units from S. */ | | /* Count the number of Unicode characters in the N units from S. */ | |
| /* Similar to mbsnlen(). */ | | /* Similar to mbsnlen(). */ | |
| extern size_t | | extern size_t | |
|
| u8_mbsnlen (const uint8_t *s, size_t n); | | u8_mbsnlen (const uint8_t *s, size_t n) | |
| | | _UC_ATTRIBUTE_PURE; | |
| extern size_t | | extern size_t | |
|
| u16_mbsnlen (const uint16_t *s, size_t n); | | u16_mbsnlen (const uint16_t *s, size_t n) | |
| | | _UC_ATTRIBUTE_PURE; | |
| extern size_t | | extern size_t | |
|
| u32_mbsnlen (const uint32_t *s, size_t n); | | u32_mbsnlen (const uint32_t *s, size_t n) | |
| | | _UC_ATTRIBUTE_PURE; | |
| | | | |
| /* Elementary string functions with memory allocation. */ | | /* Elementary string functions with memory allocation. */ | |
| | | | |
| /* Make a freshly allocated copy of S, of length N. */ | | /* Make a freshly allocated copy of S, of length N. */ | |
| extern uint8_t * | | extern uint8_t * | |
| u8_cpy_alloc (const uint8_t *s, size_t n); | | u8_cpy_alloc (const uint8_t *s, size_t n); | |
| extern uint16_t * | | extern uint16_t * | |
| u16_cpy_alloc (const uint16_t *s, size_t n); | | u16_cpy_alloc (const uint16_t *s, size_t n); | |
| extern uint32_t * | | extern uint32_t * | |
| u32_cpy_alloc (const uint32_t *s, size_t n); | | u32_cpy_alloc (const uint32_t *s, size_t n); | |
| | | | |
| /* Elementary string functions on NUL terminated strings. */ | | /* Elementary string functions on NUL terminated strings. */ | |
| | | | |
| /* Return the length (number of units) of the first character in S. | | /* Return the length (number of units) of the first character in S. | |
| Return 0 if it is the NUL character. Return -1 upon failure. */ | | Return 0 if it is the NUL character. Return -1 upon failure. */ | |
| extern int | | extern int | |
|
| u8_strmblen (const uint8_t *s); | | u8_strmblen (const uint8_t *s) | |
| | | _UC_ATTRIBUTE_PURE; | |
| extern int | | extern int | |
|
| u16_strmblen (const uint16_t *s); | | u16_strmblen (const uint16_t *s) | |
| | | _UC_ATTRIBUTE_PURE; | |
| extern int | | extern int | |
|
| u32_strmblen (const uint32_t *s); | | u32_strmblen (const uint32_t *s) | |
| | | _UC_ATTRIBUTE_PURE; | |
| | | | |
| /* Return the length (number of units) of the first character in S, putting | | /* Return the length (number of units) of the first character in S, putting | |
| its 'ucs4_t' representation in *PUC. Return 0 if it is the NUL | | its 'ucs4_t' representation in *PUC. Return 0 if it is the NUL | |
| character. Return -1 upon failure. */ | | character. Return -1 upon failure. */ | |
| extern int | | extern int | |
| u8_strmbtouc (ucs4_t *puc, const uint8_t *s); | | u8_strmbtouc (ucs4_t *puc, const uint8_t *s); | |
| extern int | | extern int | |
| u16_strmbtouc (ucs4_t *puc, const uint16_t *s); | | u16_strmbtouc (ucs4_t *puc, const uint16_t *s); | |
| extern int | | extern int | |
| u32_strmbtouc (ucs4_t *puc, const uint32_t *s); | | u32_strmbtouc (ucs4_t *puc, const uint32_t *s); | |
| | | | |
| skipping to change at line 489 | | skipping to change at line 511 | |
| extern const uint8_t * | | extern const uint8_t * | |
| u8_prev (ucs4_t *puc, const uint8_t *s, const uint8_t *start); | | u8_prev (ucs4_t *puc, const uint8_t *s, const uint8_t *start); | |
| extern const uint16_t * | | extern const uint16_t * | |
| u16_prev (ucs4_t *puc, const uint16_t *s, const uint16_t *start); | | u16_prev (ucs4_t *puc, const uint16_t *s, const uint16_t *start); | |
| extern const uint32_t * | | extern const uint32_t * | |
| u32_prev (ucs4_t *puc, const uint32_t *s, const uint32_t *start); | | u32_prev (ucs4_t *puc, const uint32_t *s, const uint32_t *start); | |
| | | | |
| /* Return the number of units in S. */ | | /* Return the number of units in S. */ | |
| /* Similar to strlen(), wcslen(). */ | | /* Similar to strlen(), wcslen(). */ | |
| extern size_t | | extern size_t | |
|
| u8_strlen (const uint8_t *s); | | u8_strlen (const uint8_t *s) | |
| | | _UC_ATTRIBUTE_PURE; | |
| extern size_t | | extern size_t | |
|
| u16_strlen (const uint16_t *s); | | u16_strlen (const uint16_t *s) | |
| | | _UC_ATTRIBUTE_PURE; | |
| extern size_t | | extern size_t | |
|
| u32_strlen (const uint32_t *s); | | u32_strlen (const uint32_t *s) | |
| | | _UC_ATTRIBUTE_PURE; | |
| | | | |
| /* Return the number of units in S, but at most MAXLEN. */ | | /* Return the number of units in S, but at most MAXLEN. */ | |
| /* Similar to strnlen(), wcsnlen(). */ | | /* Similar to strnlen(), wcsnlen(). */ | |
| extern size_t | | extern size_t | |
|
| u8_strnlen (const uint8_t *s, size_t maxlen); | | u8_strnlen (const uint8_t *s, size_t maxlen) | |
| | | _UC_ATTRIBUTE_PURE; | |
| extern size_t | | extern size_t | |
|
| u16_strnlen (const uint16_t *s, size_t maxlen); | | u16_strnlen (const uint16_t *s, size_t maxlen) | |
| | | _UC_ATTRIBUTE_PURE; | |
| extern size_t | | extern size_t | |
|
| u32_strnlen (const uint32_t *s, size_t maxlen); | | u32_strnlen (const uint32_t *s, size_t maxlen) | |
| | | _UC_ATTRIBUTE_PURE; | |
| | | | |
| /* Copy SRC to DEST. */ | | /* Copy SRC to DEST. */ | |
| /* Similar to strcpy(), wcscpy(). */ | | /* Similar to strcpy(), wcscpy(). */ | |
| extern uint8_t * | | extern uint8_t * | |
| u8_strcpy (uint8_t *dest, const uint8_t *src); | | u8_strcpy (uint8_t *dest, const uint8_t *src); | |
| extern uint16_t * | | extern uint16_t * | |
| u16_strcpy (uint16_t *dest, const uint16_t *src); | | u16_strcpy (uint16_t *dest, const uint16_t *src); | |
| extern uint32_t * | | extern uint32_t * | |
| u32_strcpy (uint32_t *dest, const uint32_t *src); | | u32_strcpy (uint32_t *dest, const uint32_t *src); | |
| | | | |
| | | | |
| skipping to change at line 561 | | skipping to change at line 589 | |
| /* Similar to strncat(), wcsncat(). */ | | /* Similar to strncat(), wcsncat(). */ | |
| extern uint8_t * | | extern uint8_t * | |
| u8_strncat (uint8_t *dest, const uint8_t *src, size_t n); | | u8_strncat (uint8_t *dest, const uint8_t *src, size_t n); | |
| extern uint16_t * | | extern uint16_t * | |
| u16_strncat (uint16_t *dest, const uint16_t *src, size_t n); | | u16_strncat (uint16_t *dest, const uint16_t *src, size_t n); | |
| extern uint32_t * | | extern uint32_t * | |
| u32_strncat (uint32_t *dest, const uint32_t *src, size_t n); | | u32_strncat (uint32_t *dest, const uint32_t *src, size_t n); | |
| | | | |
| /* Compare S1 and S2. */ | | /* Compare S1 and S2. */ | |
| /* Similar to strcmp(), wcscmp(). */ | | /* Similar to strcmp(), wcscmp(). */ | |
|
| | | #ifdef __sun | |
| | | /* Avoid a collision with the u8_strcmp() function in Solaris 11 libc. */ | |
| extern int | | extern int | |
|
| u8_strcmp (const uint8_t *s1, const uint8_t *s2); | | u8_strcmp_gnu (const uint8_t *s1, const uint8_t *s2) | |
| | | _UC_ATTRIBUTE_PURE; | |
| | | # define u8_strcmp u8_strcmp_gnu | |
| | | #else | |
| extern int | | extern int | |
|
| u16_strcmp (const uint16_t *s1, const uint16_t *s2); | | u8_strcmp (const uint8_t *s1, const uint8_t *s2) | |
| | | _UC_ATTRIBUTE_PURE; | |
| | | #endif | |
| | | extern int | |
| | | u16_strcmp (const uint16_t *s1, const uint16_t *s2) | |
| | | _UC_ATTRIBUTE_PURE; | |
| extern int | | extern int | |
|
| u32_strcmp (const uint32_t *s1, const uint32_t *s2); | | u32_strcmp (const uint32_t *s1, const uint32_t *s2) | |
| | | _UC_ATTRIBUTE_PURE; | |
| | | | |
| /* Compare S1 and S2 using the collation rules of the current locale. | | /* Compare S1 and S2 using the collation rules of the current locale. | |
| Return -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2. | | Return -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2. | |
| Upon failure, set errno and return any value. */ | | Upon failure, set errno and return any value. */ | |
| /* Similar to strcoll(), wcscoll(). */ | | /* Similar to strcoll(), wcscoll(). */ | |
| extern int | | extern int | |
| u8_strcoll (const uint8_t *s1, const uint8_t *s2); | | u8_strcoll (const uint8_t *s1, const uint8_t *s2); | |
| extern int | | extern int | |
| u16_strcoll (const uint16_t *s1, const uint16_t *s2); | | u16_strcoll (const uint16_t *s1, const uint16_t *s2); | |
| extern int | | extern int | |
| u32_strcoll (const uint32_t *s1, const uint32_t *s2); | | u32_strcoll (const uint32_t *s1, const uint32_t *s2); | |
| | | | |
| /* Compare no more than N units of S1 and S2. */ | | /* Compare no more than N units of S1 and S2. */ | |
| /* Similar to strncmp(), wcsncmp(). */ | | /* Similar to strncmp(), wcsncmp(). */ | |
| extern int | | extern int | |
|
| u8_strncmp (const uint8_t *s1, const uint8_t *s2, size_t n); | | u8_strncmp (const uint8_t *s1, const uint8_t *s2, size_t n) | |
| | | _UC_ATTRIBUTE_PURE; | |
| extern int | | extern int | |
|
| u16_strncmp (const uint16_t *s1, const uint16_t *s2, size_t n); | | u16_strncmp (const uint16_t *s1, const uint16_t *s2, size_t n) | |
| | | _UC_ATTRIBUTE_PURE; | |
| extern int | | extern int | |
|
| u32_strncmp (const uint32_t *s1, const uint32_t *s2, size_t n); | | u32_strncmp (const uint32_t *s1, const uint32_t *s2, size_t n) | |
| | | _UC_ATTRIBUTE_PURE; | |
| | | | |
| /* Duplicate S, returning an identical malloc'd string. */ | | /* Duplicate S, returning an identical malloc'd string. */ | |
| /* Similar to strdup(), wcsdup(). */ | | /* Similar to strdup(), wcsdup(). */ | |
| extern uint8_t * | | extern uint8_t * | |
| u8_strdup (const uint8_t *s); | | u8_strdup (const uint8_t *s); | |
| extern uint16_t * | | extern uint16_t * | |
| u16_strdup (const uint16_t *s); | | u16_strdup (const uint16_t *s); | |
| extern uint32_t * | | extern uint32_t * | |
| u32_strdup (const uint32_t *s); | | u32_strdup (const uint32_t *s); | |
| | | | |
| /* Find the first occurrence of UC in STR. */ | | /* Find the first occurrence of UC in STR. */ | |
| /* Similar to strchr(), wcschr(). */ | | /* Similar to strchr(), wcschr(). */ | |
| extern uint8_t * | | extern uint8_t * | |
|
| u8_strchr (const uint8_t *str, ucs4_t uc); | | u8_strchr (const uint8_t *str, ucs4_t uc) | |
| | | _UC_ATTRIBUTE_PURE; | |
| extern uint16_t * | | extern uint16_t * | |
|
| u16_strchr (const uint16_t *str, ucs4_t uc); | | u16_strchr (const uint16_t *str, ucs4_t uc) | |
| | | _UC_ATTRIBUTE_PURE; | |
| extern uint32_t * | | extern uint32_t * | |
|
| u32_strchr (const uint32_t *str, ucs4_t uc); | | u32_strchr (const uint32_t *str, ucs4_t uc) | |
| | | _UC_ATTRIBUTE_PURE; | |
| | | | |
| /* Find the last occurrence of UC in STR. */ | | /* Find the last occurrence of UC in STR. */ | |
| /* Similar to strrchr(), wcsrchr(). */ | | /* Similar to strrchr(), wcsrchr(). */ | |
| extern uint8_t * | | extern uint8_t * | |
|
| u8_strrchr (const uint8_t *str, ucs4_t uc); | | u8_strrchr (const uint8_t *str, ucs4_t uc) | |
| | | _UC_ATTRIBUTE_PURE; | |
| extern uint16_t * | | extern uint16_t * | |
|
| u16_strrchr (const uint16_t *str, ucs4_t uc); | | u16_strrchr (const uint16_t *str, ucs4_t uc) | |
| | | _UC_ATTRIBUTE_PURE; | |
| extern uint32_t * | | extern uint32_t * | |
|
| u32_strrchr (const uint32_t *str, ucs4_t uc); | | u32_strrchr (const uint32_t *str, ucs4_t uc) | |
| | | _UC_ATTRIBUTE_PURE; | |
| | | | |
| /* Return the length of the initial segment of STR which consists entirely | | /* Return the length of the initial segment of STR which consists entirely | |
| of Unicode characters not in REJECT. */ | | of Unicode characters not in REJECT. */ | |
| /* Similar to strcspn(), wcscspn(). */ | | /* Similar to strcspn(), wcscspn(). */ | |
| extern size_t | | extern size_t | |
|
| u8_strcspn (const uint8_t *str, const uint8_t *reject); | | u8_strcspn (const uint8_t *str, const uint8_t *reject) | |
| | | _UC_ATTRIBUTE_PURE; | |
| extern size_t | | extern size_t | |
|
| u16_strcspn (const uint16_t *str, const uint16_t *reject); | | u16_strcspn (const uint16_t *str, const uint16_t *reject) | |
| | | _UC_ATTRIBUTE_PURE; | |
| extern size_t | | extern size_t | |
|
| u32_strcspn (const uint32_t *str, const uint32_t *reject); | | u32_strcspn (const uint32_t *str, const uint32_t *reject) | |
| | | _UC_ATTRIBUTE_PURE; | |
| | | | |
| /* Return the length of the initial segment of STR which consists entirely | | /* Return the length of the initial segment of STR which consists entirely | |
| of Unicode characters in ACCEPT. */ | | of Unicode characters in ACCEPT. */ | |
| /* Similar to strspn(), wcsspn(). */ | | /* Similar to strspn(), wcsspn(). */ | |
| extern size_t | | extern size_t | |
|
| u8_strspn (const uint8_t *str, const uint8_t *accept); | | u8_strspn (const uint8_t *str, const uint8_t *accept) | |
| | | _UC_ATTRIBUTE_PURE; | |
| extern size_t | | extern size_t | |
|
| u16_strspn (const uint16_t *str, const uint16_t *accept); | | u16_strspn (const uint16_t *str, const uint16_t *accept) | |
| | | _UC_ATTRIBUTE_PURE; | |
| extern size_t | | extern size_t | |
|
| u32_strspn (const uint32_t *str, const uint32_t *accept); | | u32_strspn (const uint32_t *str, const uint32_t *accept) | |
| | | _UC_ATTRIBUTE_PURE; | |
| | | | |
| /* Find the first occurrence in STR of any character in ACCEPT. */ | | /* Find the first occurrence in STR of any character in ACCEPT. */ | |
| /* Similar to strpbrk(), wcspbrk(). */ | | /* Similar to strpbrk(), wcspbrk(). */ | |
| extern uint8_t * | | extern uint8_t * | |
|
| u8_strpbrk (const uint8_t *str, const uint8_t *accept); | | u8_strpbrk (const uint8_t *str, const uint8_t *accept) | |
| | | _UC_ATTRIBUTE_PURE; | |
| extern uint16_t * | | extern uint16_t * | |
|
| u16_strpbrk (const uint16_t *str, const uint16_t *accept); | | u16_strpbrk (const uint16_t *str, const uint16_t *accept) | |
| | | _UC_ATTRIBUTE_PURE; | |
| extern uint32_t * | | extern uint32_t * | |
|
| u32_strpbrk (const uint32_t *str, const uint32_t *accept); | | u32_strpbrk (const uint32_t *str, const uint32_t *accept) | |
| | | _UC_ATTRIBUTE_PURE; | |
| | | | |
| /* Find the first occurrence of NEEDLE in HAYSTACK. */ | | /* Find the first occurrence of NEEDLE in HAYSTACK. */ | |
| /* Similar to strstr(), wcsstr(). */ | | /* Similar to strstr(), wcsstr(). */ | |
| extern uint8_t * | | extern uint8_t * | |
|
| u8_strstr (const uint8_t *haystack, const uint8_t *needle); | | u8_strstr (const uint8_t *haystack, const uint8_t *needle) | |
| | | _UC_ATTRIBUTE_PURE; | |
| extern uint16_t * | | extern uint16_t * | |
|
| u16_strstr (const uint16_t *haystack, const uint16_t *needle); | | u16_strstr (const uint16_t *haystack, const uint16_t *needle) | |
| | | _UC_ATTRIBUTE_PURE; | |
| extern uint32_t * | | extern uint32_t * | |
|
| u32_strstr (const uint32_t *haystack, const uint32_t *needle); | | u32_strstr (const uint32_t *haystack, const uint32_t *needle) | |
| | | _UC_ATTRIBUTE_PURE; | |
| | | | |
| /* Test whether STR starts with PREFIX. */ | | /* Test whether STR starts with PREFIX. */ | |
| extern bool | | extern bool | |
|
| u8_startswith (const uint8_t *str, const uint8_t *prefix); | | u8_startswith (const uint8_t *str, const uint8_t *prefix) | |
| | | _UC_ATTRIBUTE_PURE; | |
| extern bool | | extern bool | |
|
| u16_startswith (const uint16_t *str, const uint16_t *prefix); | | u16_startswith (const uint16_t *str, const uint16_t *prefix) | |
| | | _UC_ATTRIBUTE_PURE; | |
| extern bool | | extern bool | |
|
| u32_startswith (const uint32_t *str, const uint32_t *prefix); | | u32_startswith (const uint32_t *str, const uint32_t *prefix) | |
| | | _UC_ATTRIBUTE_PURE; | |
| | | | |
| /* Test whether STR ends with SUFFIX. */ | | /* Test whether STR ends with SUFFIX. */ | |
| extern bool | | extern bool | |
|
| u8_endswith (const uint8_t *str, const uint8_t *suffix); | | u8_endswith (const uint8_t *str, const uint8_t *suffix) | |
| | | _UC_ATTRIBUTE_PURE; | |
| extern bool | | extern bool | |
|
| u16_endswith (const uint16_t *str, const uint16_t *suffix); | | u16_endswith (const uint16_t *str, const uint16_t *suffix) | |
| | | _UC_ATTRIBUTE_PURE; | |
| extern bool | | extern bool | |
|
| u32_endswith (const uint32_t *str, const uint32_t *suffix); | | u32_endswith (const uint32_t *str, const uint32_t *suffix) | |
| | | _UC_ATTRIBUTE_PURE; | |
| | | | |
| /* Divide STR into tokens separated by characters in DELIM. | | /* Divide STR into tokens separated by characters in DELIM. | |
| This interface is actually more similar to wcstok than to strtok. */ | | This interface is actually more similar to wcstok than to strtok. */ | |
| /* Similar to strtok_r(), wcstok(). */ | | /* Similar to strtok_r(), wcstok(). */ | |
| extern uint8_t * | | extern uint8_t * | |
| u8_strtok (uint8_t *str, const uint8_t *delim, uint8_t **ptr); | | u8_strtok (uint8_t *str, const uint8_t *delim, uint8_t **ptr); | |
| extern uint16_t * | | extern uint16_t * | |
| u16_strtok (uint16_t *str, const uint16_t *delim, uint16_t **ptr); | | u16_strtok (uint16_t *str, const uint16_t *delim, uint16_t **ptr); | |
| extern uint32_t * | | extern uint32_t * | |
| u32_strtok (uint32_t *str, const uint32_t *delim, uint32_t **ptr); | | u32_strtok (uint32_t *str, const uint32_t *delim, uint32_t **ptr); | |
| | | | |
End of changes. 60 change blocks. |
| 61 lines changed or deleted | | 126 lines changed or added | |
|