uchar.h 131 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706
  1. // Copyright (C) 2016 and later: Unicode, Inc. and others.
  2. // License & terms of use: http://www.unicode.org/copyright.html
  3. /*
  4. **********************************************************************
  5. * Copyright (C) 1997-2016, International Business Machines
  6. * Corporation and others. All Rights Reserved.
  7. **********************************************************************
  8. *
  9. * File UCHAR.H
  10. *
  11. * Modification History:
  12. *
  13. * Date Name Description
  14. * 04/02/97 aliu Creation.
  15. * 03/29/99 helena Updated for C APIs.
  16. * 4/15/99 Madhu Updated for C Implementation and Javadoc
  17. * 5/20/99 Madhu Added the function u_getVersion()
  18. * 8/19/1999 srl Upgraded scripts to Unicode 3.0
  19. * 8/27/1999 schererm UCharDirection constants: U_...
  20. * 11/11/1999 weiv added u_isalnum(), cleaned comments
  21. * 01/11/2000 helena Renamed u_getVersion to u_getUnicodeVersion().
  22. ******************************************************************************
  23. */
  24. #ifndef UCHAR_H
  25. #define UCHAR_H
  26. #include "utypes.h"
  27. U_CDECL_BEGIN
  28. /*==========================================================================*/
  29. /* Unicode version number */
  30. /*==========================================================================*/
  31. /**
  32. * Unicode version number, default for the current ICU version.
  33. * The actual Unicode Character Database (UCD) data is stored in uprops.dat
  34. * and may be generated from UCD files from a different Unicode version.
  35. * Call u_getUnicodeVersion to get the actual Unicode version of the data.
  36. *
  37. * @see u_getUnicodeVersion
  38. * @stable ICU 2.0
  39. */
  40. #define U_UNICODE_VERSION "9.0"
  41. /**
  42. * \file
  43. * \brief C API: Unicode Properties
  44. *
  45. * This C API provides low-level access to the Unicode Character Database.
  46. * In addition to raw property values, some convenience functions calculate
  47. * derived properties, for example for Java-style programming.
  48. *
  49. * Unicode assigns each code point (not just assigned character) values for
  50. * many properties.
  51. * Most of them are simple boolean flags, or constants from a small enumerated list.
  52. * For some properties, values are strings or other relatively more complex types.
  53. *
  54. * For more information see
  55. * "About the Unicode Character Database" (http://www.unicode.org/ucd/)
  56. * and the ICU User Guide chapter on Properties (http://icu-project.org/userguide/properties.html).
  57. *
  58. * Many functions are designed to match java.lang.Character functions.
  59. * See the individual function documentation,
  60. * and see the JDK 1.4 java.lang.Character documentation
  61. * at http://java.sun.com/j2se/1.4/docs/api/java/lang/Character.html
  62. *
  63. * There are also functions that provide easy migration from C/POSIX functions
  64. * like isblank(). Their use is generally discouraged because the C/POSIX
  65. * standards do not define their semantics beyond the ASCII range, which means
  66. * that different implementations exhibit very different behavior.
  67. * Instead, Unicode properties should be used directly.
  68. *
  69. * There are also only a few, broad C/POSIX character classes, and they tend
  70. * to be used for conflicting purposes. For example, the "isalpha()" class
  71. * is sometimes used to determine word boundaries, while a more sophisticated
  72. * approach would at least distinguish initial letters from continuation
  73. * characters (the latter including combining marks).
  74. * (In ICU, BreakIterator is the most sophisticated API for word boundaries.)
  75. * Another example: There is no "istitle()" class for titlecase characters.
  76. *
  77. * ICU 3.4 and later provides API access for all twelve C/POSIX character classes.
  78. * ICU implements them according to the Standard Recommendations in
  79. * Annex C: Compatibility Properties of UTS #18 Unicode Regular Expressions
  80. * (http://www.unicode.org/reports/tr18/#Compatibility_Properties).
  81. *
  82. * API access for C/POSIX character classes is as follows:
  83. * - alpha: u_isUAlphabetic(c) or u_hasBinaryProperty(c, UCHAR_ALPHABETIC)
  84. * - lower: u_isULowercase(c) or u_hasBinaryProperty(c, UCHAR_LOWERCASE)
  85. * - upper: u_isUUppercase(c) or u_hasBinaryProperty(c, UCHAR_UPPERCASE)
  86. * - punct: u_ispunct(c)
  87. * - digit: u_isdigit(c) or u_charType(c)==U_DECIMAL_DIGIT_NUMBER
  88. * - xdigit: u_isxdigit(c) or u_hasBinaryProperty(c, UCHAR_POSIX_XDIGIT)
  89. * - alnum: u_hasBinaryProperty(c, UCHAR_POSIX_ALNUM)
  90. * - space: u_isUWhiteSpace(c) or u_hasBinaryProperty(c, UCHAR_WHITE_SPACE)
  91. * - blank: u_isblank(c) or u_hasBinaryProperty(c, UCHAR_POSIX_BLANK)
  92. * - cntrl: u_charType(c)==U_CONTROL_CHAR
  93. * - graph: u_hasBinaryProperty(c, UCHAR_POSIX_GRAPH)
  94. * - print: u_hasBinaryProperty(c, UCHAR_POSIX_PRINT)
  95. *
  96. * Note: Some of the u_isxyz() functions in uchar.h predate, and do not match,
  97. * the Standard Recommendations in UTS #18. Instead, they match Java
  98. * functions according to their API documentation.
  99. *
  100. * \htmlonly
  101. * The C/POSIX character classes are also available in UnicodeSet patterns,
  102. * using patterns like [:graph:] or \p{graph}.
  103. * \endhtmlonly
  104. *
  105. * Note: There are several ICU whitespace functions.
  106. * Comparison:
  107. * - u_isUWhiteSpace=UCHAR_WHITE_SPACE: Unicode White_Space property;
  108. * most of general categories "Z" (separators) + most whitespace ISO controls
  109. * (including no-break spaces, but excluding IS1..IS4 and ZWSP)
  110. * - u_isWhitespace: Java isWhitespace; Z + whitespace ISO controls but excluding no-break spaces
  111. * - u_isJavaSpaceChar: Java isSpaceChar; just Z (including no-break spaces)
  112. * - u_isspace: Z + whitespace ISO controls (including no-break spaces)
  113. * - u_isblank: "horizontal spaces" = TAB + Zs - ZWSP
  114. */
  115. /**
  116. * Constants.
  117. */
  118. /** The lowest Unicode code point value. Code points are non-negative. @stable ICU 2.0 */
  119. #define UCHAR_MIN_VALUE 0
  120. /**
  121. * The highest Unicode code point value (scalar value) according to
  122. * The Unicode Standard. This is a 21-bit value (20.1 bits, rounded up).
  123. * For a single character, UChar32 is a simple type that can hold any code point value.
  124. *
  125. * @see UChar32
  126. * @stable ICU 2.0
  127. */
  128. #define UCHAR_MAX_VALUE 0x10ffff
  129. /**
  130. * Get a single-bit bit set (a flag) from a bit number 0..31.
  131. * @stable ICU 2.1
  132. */
  133. #define U_MASK(x) ((uint32_t)1<<(x))
  134. /**
  135. * Selection constants for Unicode properties.
  136. * These constants are used in functions like u_hasBinaryProperty to select
  137. * one of the Unicode properties.
  138. *
  139. * The properties APIs are intended to reflect Unicode properties as defined
  140. * in the Unicode Character Database (UCD) and Unicode Technical Reports (UTR).
  141. * For details about the properties see http://www.unicode.org/ucd/ .
  142. * For names of Unicode properties see the UCD file PropertyAliases.txt.
  143. *
  144. * Important: If ICU is built with UCD files from Unicode versions below, e.g., 3.2,
  145. * then properties marked with "new in Unicode 3.2" are not or not fully available.
  146. * Check u_getUnicodeVersion to be sure.
  147. *
  148. * @see u_hasBinaryProperty
  149. * @see u_getIntPropertyValue
  150. * @see u_getUnicodeVersion
  151. * @stable ICU 2.1
  152. */
  153. typedef enum UProperty {
  154. /*
  155. * Note: UProperty constants are parsed by preparseucd.py.
  156. * It matches lines like
  157. * UCHAR_<Unicode property name>=<integer>,
  158. */
  159. /* Note: Place UCHAR_ALPHABETIC before UCHAR_BINARY_START so that
  160. debuggers display UCHAR_ALPHABETIC as the symbolic name for 0,
  161. rather than UCHAR_BINARY_START. Likewise for other *_START
  162. identifiers. */
  163. /** Binary property Alphabetic. Same as u_isUAlphabetic, different from u_isalpha.
  164. Lu+Ll+Lt+Lm+Lo+Nl+Other_Alphabetic @stable ICU 2.1 */
  165. UCHAR_ALPHABETIC=0,
  166. /** First constant for binary Unicode properties. @stable ICU 2.1 */
  167. UCHAR_BINARY_START=UCHAR_ALPHABETIC,
  168. /** Binary property ASCII_Hex_Digit. 0-9 A-F a-f @stable ICU 2.1 */
  169. UCHAR_ASCII_HEX_DIGIT=1,
  170. /** Binary property Bidi_Control.
  171. Format controls which have specific functions
  172. in the Bidi Algorithm. @stable ICU 2.1 */
  173. UCHAR_BIDI_CONTROL=2,
  174. /** Binary property Bidi_Mirrored.
  175. Characters that may change display in RTL text.
  176. Same as u_isMirrored.
  177. See Bidi Algorithm, UTR 9. @stable ICU 2.1 */
  178. UCHAR_BIDI_MIRRORED=3,
  179. /** Binary property Dash. Variations of dashes. @stable ICU 2.1 */
  180. UCHAR_DASH=4,
  181. /** Binary property Default_Ignorable_Code_Point (new in Unicode 3.2).
  182. Ignorable in most processing.
  183. <2060..206F, FFF0..FFFB, E0000..E0FFF>+Other_Default_Ignorable_Code_Point+(Cf+Cc+Cs-White_Space) @stable ICU 2.1 */
  184. UCHAR_DEFAULT_IGNORABLE_CODE_POINT=5,
  185. /** Binary property Deprecated (new in Unicode 3.2).
  186. The usage of deprecated characters is strongly discouraged. @stable ICU 2.1 */
  187. UCHAR_DEPRECATED=6,
  188. /** Binary property Diacritic. Characters that linguistically modify
  189. the meaning of another character to which they apply. @stable ICU 2.1 */
  190. UCHAR_DIACRITIC=7,
  191. /** Binary property Extender.
  192. Extend the value or shape of a preceding alphabetic character,
  193. e.g., length and iteration marks. @stable ICU 2.1 */
  194. UCHAR_EXTENDER=8,
  195. /** Binary property Full_Composition_Exclusion.
  196. CompositionExclusions.txt+Singleton Decompositions+
  197. Non-Starter Decompositions. @stable ICU 2.1 */
  198. UCHAR_FULL_COMPOSITION_EXCLUSION=9,
  199. /** Binary property Grapheme_Base (new in Unicode 3.2).
  200. For programmatic determination of grapheme cluster boundaries.
  201. [0..10FFFF]-Cc-Cf-Cs-Co-Cn-Zl-Zp-Grapheme_Link-Grapheme_Extend-CGJ @stable ICU 2.1 */
  202. UCHAR_GRAPHEME_BASE=10,
  203. /** Binary property Grapheme_Extend (new in Unicode 3.2).
  204. For programmatic determination of grapheme cluster boundaries.
  205. Me+Mn+Mc+Other_Grapheme_Extend-Grapheme_Link-CGJ @stable ICU 2.1 */
  206. UCHAR_GRAPHEME_EXTEND=11,
  207. /** Binary property Grapheme_Link (new in Unicode 3.2).
  208. For programmatic determination of grapheme cluster boundaries. @stable ICU 2.1 */
  209. UCHAR_GRAPHEME_LINK=12,
  210. /** Binary property Hex_Digit.
  211. Characters commonly used for hexadecimal numbers. @stable ICU 2.1 */
  212. UCHAR_HEX_DIGIT=13,
  213. /** Binary property Hyphen. Dashes used to mark connections
  214. between pieces of words, plus the Katakana middle dot. @stable ICU 2.1 */
  215. UCHAR_HYPHEN=14,
  216. /** Binary property ID_Continue.
  217. Characters that can continue an identifier.
  218. DerivedCoreProperties.txt also says "NOTE: Cf characters should be filtered out."
  219. ID_Start+Mn+Mc+Nd+Pc @stable ICU 2.1 */
  220. UCHAR_ID_CONTINUE=15,
  221. /** Binary property ID_Start.
  222. Characters that can start an identifier.
  223. Lu+Ll+Lt+Lm+Lo+Nl @stable ICU 2.1 */
  224. UCHAR_ID_START=16,
  225. /** Binary property Ideographic.
  226. CJKV ideographs. @stable ICU 2.1 */
  227. UCHAR_IDEOGRAPHIC=17,
  228. /** Binary property IDS_Binary_Operator (new in Unicode 3.2).
  229. For programmatic determination of
  230. Ideographic Description Sequences. @stable ICU 2.1 */
  231. UCHAR_IDS_BINARY_OPERATOR=18,
  232. /** Binary property IDS_Trinary_Operator (new in Unicode 3.2).
  233. For programmatic determination of
  234. Ideographic Description Sequences. @stable ICU 2.1 */
  235. UCHAR_IDS_TRINARY_OPERATOR=19,
  236. /** Binary property Join_Control.
  237. Format controls for cursive joining and ligation. @stable ICU 2.1 */
  238. UCHAR_JOIN_CONTROL=20,
  239. /** Binary property Logical_Order_Exception (new in Unicode 3.2).
  240. Characters that do not use logical order and
  241. require special handling in most processing. @stable ICU 2.1 */
  242. UCHAR_LOGICAL_ORDER_EXCEPTION=21,
  243. /** Binary property Lowercase. Same as u_isULowercase, different from u_islower.
  244. Ll+Other_Lowercase @stable ICU 2.1 */
  245. UCHAR_LOWERCASE=22,
  246. /** Binary property Math. Sm+Other_Math @stable ICU 2.1 */
  247. UCHAR_MATH=23,
  248. /** Binary property Noncharacter_Code_Point.
  249. Code points that are explicitly defined as illegal
  250. for the encoding of characters. @stable ICU 2.1 */
  251. UCHAR_NONCHARACTER_CODE_POINT=24,
  252. /** Binary property Quotation_Mark. @stable ICU 2.1 */
  253. UCHAR_QUOTATION_MARK=25,
  254. /** Binary property Radical (new in Unicode 3.2).
  255. For programmatic determination of
  256. Ideographic Description Sequences. @stable ICU 2.1 */
  257. UCHAR_RADICAL=26,
  258. /** Binary property Soft_Dotted (new in Unicode 3.2).
  259. Characters with a "soft dot", like i or j.
  260. An accent placed on these characters causes
  261. the dot to disappear. @stable ICU 2.1 */
  262. UCHAR_SOFT_DOTTED=27,
  263. /** Binary property Terminal_Punctuation.
  264. Punctuation characters that generally mark
  265. the end of textual units. @stable ICU 2.1 */
  266. UCHAR_TERMINAL_PUNCTUATION=28,
  267. /** Binary property Unified_Ideograph (new in Unicode 3.2).
  268. For programmatic determination of
  269. Ideographic Description Sequences. @stable ICU 2.1 */
  270. UCHAR_UNIFIED_IDEOGRAPH=29,
  271. /** Binary property Uppercase. Same as u_isUUppercase, different from u_isupper.
  272. Lu+Other_Uppercase @stable ICU 2.1 */
  273. UCHAR_UPPERCASE=30,
  274. /** Binary property White_Space.
  275. Same as u_isUWhiteSpace, different from u_isspace and u_isWhitespace.
  276. Space characters+TAB+CR+LF-ZWSP-ZWNBSP @stable ICU 2.1 */
  277. UCHAR_WHITE_SPACE=31,
  278. /** Binary property XID_Continue.
  279. ID_Continue modified to allow closure under
  280. normalization forms NFKC and NFKD. @stable ICU 2.1 */
  281. UCHAR_XID_CONTINUE=32,
  282. /** Binary property XID_Start. ID_Start modified to allow
  283. closure under normalization forms NFKC and NFKD. @stable ICU 2.1 */
  284. UCHAR_XID_START=33,
  285. /** Binary property Case_Sensitive. Either the source of a case
  286. mapping or _in_ the target of a case mapping. Not the same as
  287. the general category Cased_Letter. @stable ICU 2.6 */
  288. UCHAR_CASE_SENSITIVE=34,
  289. /** Binary property STerm (new in Unicode 4.0.1).
  290. Sentence Terminal. Used in UAX #29: Text Boundaries
  291. (http://www.unicode.org/reports/tr29/)
  292. @stable ICU 3.0 */
  293. UCHAR_S_TERM=35,
  294. /** Binary property Variation_Selector (new in Unicode 4.0.1).
  295. Indicates all those characters that qualify as Variation Selectors.
  296. For details on the behavior of these characters,
  297. see StandardizedVariants.html and 15.6 Variation Selectors.
  298. @stable ICU 3.0 */
  299. UCHAR_VARIATION_SELECTOR=36,
  300. /** Binary property NFD_Inert.
  301. ICU-specific property for characters that are inert under NFD,
  302. i.e., they do not interact with adjacent characters.
  303. See the documentation for the Normalizer2 class and the
  304. Normalizer2::isInert() method.
  305. @stable ICU 3.0 */
  306. UCHAR_NFD_INERT=37,
  307. /** Binary property NFKD_Inert.
  308. ICU-specific property for characters that are inert under NFKD,
  309. i.e., they do not interact with adjacent characters.
  310. See the documentation for the Normalizer2 class and the
  311. Normalizer2::isInert() method.
  312. @stable ICU 3.0 */
  313. UCHAR_NFKD_INERT=38,
  314. /** Binary property NFC_Inert.
  315. ICU-specific property for characters that are inert under NFC,
  316. i.e., they do not interact with adjacent characters.
  317. See the documentation for the Normalizer2 class and the
  318. Normalizer2::isInert() method.
  319. @stable ICU 3.0 */
  320. UCHAR_NFC_INERT=39,
  321. /** Binary property NFKC_Inert.
  322. ICU-specific property for characters that are inert under NFKC,
  323. i.e., they do not interact with adjacent characters.
  324. See the documentation for the Normalizer2 class and the
  325. Normalizer2::isInert() method.
  326. @stable ICU 3.0 */
  327. UCHAR_NFKC_INERT=40,
  328. /** Binary Property Segment_Starter.
  329. ICU-specific property for characters that are starters in terms of
  330. Unicode normalization and combining character sequences.
  331. They have ccc=0 and do not occur in non-initial position of the
  332. canonical decomposition of any character
  333. (like a-umlaut in NFD and a Jamo T in an NFD(Hangul LVT)).
  334. ICU uses this property for segmenting a string for generating a set of
  335. canonically equivalent strings, e.g. for canonical closure while
  336. processing collation tailoring rules.
  337. @stable ICU 3.0 */
  338. UCHAR_SEGMENT_STARTER=41,
  339. /** Binary property Pattern_Syntax (new in Unicode 4.1).
  340. See UAX #31 Identifier and Pattern Syntax
  341. (http://www.unicode.org/reports/tr31/)
  342. @stable ICU 3.4 */
  343. UCHAR_PATTERN_SYNTAX=42,
  344. /** Binary property Pattern_White_Space (new in Unicode 4.1).
  345. See UAX #31 Identifier and Pattern Syntax
  346. (http://www.unicode.org/reports/tr31/)
  347. @stable ICU 3.4 */
  348. UCHAR_PATTERN_WHITE_SPACE=43,
  349. /** Binary property alnum (a C/POSIX character class).
  350. Implemented according to the UTS #18 Annex C Standard Recommendation.
  351. See the uchar.h file documentation.
  352. @stable ICU 3.4 */
  353. UCHAR_POSIX_ALNUM=44,
  354. /** Binary property blank (a C/POSIX character class).
  355. Implemented according to the UTS #18 Annex C Standard Recommendation.
  356. See the uchar.h file documentation.
  357. @stable ICU 3.4 */
  358. UCHAR_POSIX_BLANK=45,
  359. /** Binary property graph (a C/POSIX character class).
  360. Implemented according to the UTS #18 Annex C Standard Recommendation.
  361. See the uchar.h file documentation.
  362. @stable ICU 3.4 */
  363. UCHAR_POSIX_GRAPH=46,
  364. /** Binary property print (a C/POSIX character class).
  365. Implemented according to the UTS #18 Annex C Standard Recommendation.
  366. See the uchar.h file documentation.
  367. @stable ICU 3.4 */
  368. UCHAR_POSIX_PRINT=47,
  369. /** Binary property xdigit (a C/POSIX character class).
  370. Implemented according to the UTS #18 Annex C Standard Recommendation.
  371. See the uchar.h file documentation.
  372. @stable ICU 3.4 */
  373. UCHAR_POSIX_XDIGIT=48,
  374. /** Binary property Cased. For Lowercase, Uppercase and Titlecase characters. @stable ICU 4.4 */
  375. UCHAR_CASED=49,
  376. /** Binary property Case_Ignorable. Used in context-sensitive case mappings. @stable ICU 4.4 */
  377. UCHAR_CASE_IGNORABLE=50,
  378. /** Binary property Changes_When_Lowercased. @stable ICU 4.4 */
  379. UCHAR_CHANGES_WHEN_LOWERCASED=51,
  380. /** Binary property Changes_When_Uppercased. @stable ICU 4.4 */
  381. UCHAR_CHANGES_WHEN_UPPERCASED=52,
  382. /** Binary property Changes_When_Titlecased. @stable ICU 4.4 */
  383. UCHAR_CHANGES_WHEN_TITLECASED=53,
  384. /** Binary property Changes_When_Casefolded. @stable ICU 4.4 */
  385. UCHAR_CHANGES_WHEN_CASEFOLDED=54,
  386. /** Binary property Changes_When_Casemapped. @stable ICU 4.4 */
  387. UCHAR_CHANGES_WHEN_CASEMAPPED=55,
  388. /** Binary property Changes_When_NFKC_Casefolded. @stable ICU 4.4 */
  389. UCHAR_CHANGES_WHEN_NFKC_CASEFOLDED=56,
  390. #ifndef U_HIDE_DRAFT_API
  391. /**
  392. * Binary property Emoji.
  393. * See http://www.unicode.org/reports/tr51/#Emoji_Properties
  394. *
  395. * @draft ICU 57
  396. */
  397. UCHAR_EMOJI=57,
  398. /**
  399. * Binary property Emoji_Presentation.
  400. * See http://www.unicode.org/reports/tr51/#Emoji_Properties
  401. *
  402. * @draft ICU 57
  403. */
  404. UCHAR_EMOJI_PRESENTATION=58,
  405. /**
  406. * Binary property Emoji_Modifier.
  407. * See http://www.unicode.org/reports/tr51/#Emoji_Properties
  408. *
  409. * @draft ICU 57
  410. */
  411. UCHAR_EMOJI_MODIFIER=59,
  412. /**
  413. * Binary property Emoji_Modifier_Base.
  414. * See http://www.unicode.org/reports/tr51/#Emoji_Properties
  415. *
  416. * @draft ICU 57
  417. */
  418. UCHAR_EMOJI_MODIFIER_BASE=60,
  419. #endif /* U_HIDE_DRAFT_API */
  420. #ifndef U_HIDE_DEPRECATED_API
  421. /**
  422. * One more than the last constant for binary Unicode properties.
  423. * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
  424. */
  425. UCHAR_BINARY_LIMIT=61,
  426. #endif // U_HIDE_DEPRECATED_API
  427. /** Enumerated property Bidi_Class.
  428. Same as u_charDirection, returns UCharDirection values. @stable ICU 2.2 */
  429. UCHAR_BIDI_CLASS=0x1000,
  430. /** First constant for enumerated/integer Unicode properties. @stable ICU 2.2 */
  431. UCHAR_INT_START=UCHAR_BIDI_CLASS,
  432. /** Enumerated property Block.
  433. Same as ublock_getCode, returns UBlockCode values. @stable ICU 2.2 */
  434. UCHAR_BLOCK=0x1001,
  435. /** Enumerated property Canonical_Combining_Class.
  436. Same as u_getCombiningClass, returns 8-bit numeric values. @stable ICU 2.2 */
  437. UCHAR_CANONICAL_COMBINING_CLASS=0x1002,
  438. /** Enumerated property Decomposition_Type.
  439. Returns UDecompositionType values. @stable ICU 2.2 */
  440. UCHAR_DECOMPOSITION_TYPE=0x1003,
  441. /** Enumerated property East_Asian_Width.
  442. See http://www.unicode.org/reports/tr11/
  443. Returns UEastAsianWidth values. @stable ICU 2.2 */
  444. UCHAR_EAST_ASIAN_WIDTH=0x1004,
  445. /** Enumerated property General_Category.
  446. Same as u_charType, returns UCharCategory values. @stable ICU 2.2 */
  447. UCHAR_GENERAL_CATEGORY=0x1005,
  448. /** Enumerated property Joining_Group.
  449. Returns UJoiningGroup values. @stable ICU 2.2 */
  450. UCHAR_JOINING_GROUP=0x1006,
  451. /** Enumerated property Joining_Type.
  452. Returns UJoiningType values. @stable ICU 2.2 */
  453. UCHAR_JOINING_TYPE=0x1007,
  454. /** Enumerated property Line_Break.
  455. Returns ULineBreak values. @stable ICU 2.2 */
  456. UCHAR_LINE_BREAK=0x1008,
  457. /** Enumerated property Numeric_Type.
  458. Returns UNumericType values. @stable ICU 2.2 */
  459. UCHAR_NUMERIC_TYPE=0x1009,
  460. /** Enumerated property Script.
  461. Same as uscript_getScript, returns UScriptCode values. @stable ICU 2.2 */
  462. UCHAR_SCRIPT=0x100A,
  463. /** Enumerated property Hangul_Syllable_Type, new in Unicode 4.
  464. Returns UHangulSyllableType values. @stable ICU 2.6 */
  465. UCHAR_HANGUL_SYLLABLE_TYPE=0x100B,
  466. /** Enumerated property NFD_Quick_Check.
  467. Returns UNormalizationCheckResult values. @stable ICU 3.0 */
  468. UCHAR_NFD_QUICK_CHECK=0x100C,
  469. /** Enumerated property NFKD_Quick_Check.
  470. Returns UNormalizationCheckResult values. @stable ICU 3.0 */
  471. UCHAR_NFKD_QUICK_CHECK=0x100D,
  472. /** Enumerated property NFC_Quick_Check.
  473. Returns UNormalizationCheckResult values. @stable ICU 3.0 */
  474. UCHAR_NFC_QUICK_CHECK=0x100E,
  475. /** Enumerated property NFKC_Quick_Check.
  476. Returns UNormalizationCheckResult values. @stable ICU 3.0 */
  477. UCHAR_NFKC_QUICK_CHECK=0x100F,
  478. /** Enumerated property Lead_Canonical_Combining_Class.
  479. ICU-specific property for the ccc of the first code point
  480. of the decomposition, or lccc(c)=ccc(NFD(c)[0]).
  481. Useful for checking for canonically ordered text;
  482. see UNORM_FCD and http://www.unicode.org/notes/tn5/#FCD .
  483. Returns 8-bit numeric values like UCHAR_CANONICAL_COMBINING_CLASS. @stable ICU 3.0 */
  484. UCHAR_LEAD_CANONICAL_COMBINING_CLASS=0x1010,
  485. /** Enumerated property Trail_Canonical_Combining_Class.
  486. ICU-specific property for the ccc of the last code point
  487. of the decomposition, or tccc(c)=ccc(NFD(c)[last]).
  488. Useful for checking for canonically ordered text;
  489. see UNORM_FCD and http://www.unicode.org/notes/tn5/#FCD .
  490. Returns 8-bit numeric values like UCHAR_CANONICAL_COMBINING_CLASS. @stable ICU 3.0 */
  491. UCHAR_TRAIL_CANONICAL_COMBINING_CLASS=0x1011,
  492. /** Enumerated property Grapheme_Cluster_Break (new in Unicode 4.1).
  493. Used in UAX #29: Text Boundaries
  494. (http://www.unicode.org/reports/tr29/)
  495. Returns UGraphemeClusterBreak values. @stable ICU 3.4 */
  496. UCHAR_GRAPHEME_CLUSTER_BREAK=0x1012,
  497. /** Enumerated property Sentence_Break (new in Unicode 4.1).
  498. Used in UAX #29: Text Boundaries
  499. (http://www.unicode.org/reports/tr29/)
  500. Returns USentenceBreak values. @stable ICU 3.4 */
  501. UCHAR_SENTENCE_BREAK=0x1013,
  502. /** Enumerated property Word_Break (new in Unicode 4.1).
  503. Used in UAX #29: Text Boundaries
  504. (http://www.unicode.org/reports/tr29/)
  505. Returns UWordBreakValues values. @stable ICU 3.4 */
  506. UCHAR_WORD_BREAK=0x1014,
  507. /** Enumerated property Bidi_Paired_Bracket_Type (new in Unicode 6.3).
  508. Used in UAX #9: Unicode Bidirectional Algorithm
  509. (http://www.unicode.org/reports/tr9/)
  510. Returns UBidiPairedBracketType values. @stable ICU 52 */
  511. UCHAR_BIDI_PAIRED_BRACKET_TYPE=0x1015,
  512. #ifndef U_HIDE_DEPRECATED_API
  513. /**
  514. * One more than the last constant for enumerated/integer Unicode properties.
  515. * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
  516. */
  517. UCHAR_INT_LIMIT=0x1016,
  518. #endif // U_HIDE_DEPRECATED_API
  519. /** Bitmask property General_Category_Mask.
  520. This is the General_Category property returned as a bit mask.
  521. When used in u_getIntPropertyValue(c), same as U_MASK(u_charType(c)),
  522. returns bit masks for UCharCategory values where exactly one bit is set.
  523. When used with u_getPropertyValueName() and u_getPropertyValueEnum(),
  524. a multi-bit mask is used for sets of categories like "Letters".
  525. Mask values should be cast to uint32_t.
  526. @stable ICU 2.4 */
  527. UCHAR_GENERAL_CATEGORY_MASK=0x2000,
  528. /** First constant for bit-mask Unicode properties. @stable ICU 2.4 */
  529. UCHAR_MASK_START=UCHAR_GENERAL_CATEGORY_MASK,
  530. #ifndef U_HIDE_DEPRECATED_API
  531. /**
  532. * One more than the last constant for bit-mask Unicode properties.
  533. * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
  534. */
  535. UCHAR_MASK_LIMIT=0x2001,
  536. #endif // U_HIDE_DEPRECATED_API
  537. /** Double property Numeric_Value.
  538. Corresponds to u_getNumericValue. @stable ICU 2.4 */
  539. UCHAR_NUMERIC_VALUE=0x3000,
  540. /** First constant for double Unicode properties. @stable ICU 2.4 */
  541. UCHAR_DOUBLE_START=UCHAR_NUMERIC_VALUE,
  542. #ifndef U_HIDE_DEPRECATED_API
  543. /**
  544. * One more than the last constant for double Unicode properties.
  545. * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
  546. */
  547. UCHAR_DOUBLE_LIMIT=0x3001,
  548. #endif // U_HIDE_DEPRECATED_API
  549. /** String property Age.
  550. Corresponds to u_charAge. @stable ICU 2.4 */
  551. UCHAR_AGE=0x4000,
  552. /** First constant for string Unicode properties. @stable ICU 2.4 */
  553. UCHAR_STRING_START=UCHAR_AGE,
  554. /** String property Bidi_Mirroring_Glyph.
  555. Corresponds to u_charMirror. @stable ICU 2.4 */
  556. UCHAR_BIDI_MIRRORING_GLYPH=0x4001,
  557. /** String property Case_Folding.
  558. Corresponds to u_strFoldCase in ustring.h. @stable ICU 2.4 */
  559. UCHAR_CASE_FOLDING=0x4002,
  560. #ifndef U_HIDE_DEPRECATED_API
  561. /** Deprecated string property ISO_Comment.
  562. Corresponds to u_getISOComment. @deprecated ICU 49 */
  563. UCHAR_ISO_COMMENT=0x4003,
  564. #endif /* U_HIDE_DEPRECATED_API */
  565. /** String property Lowercase_Mapping.
  566. Corresponds to u_strToLower in ustring.h. @stable ICU 2.4 */
  567. UCHAR_LOWERCASE_MAPPING=0x4004,
  568. /** String property Name.
  569. Corresponds to u_charName. @stable ICU 2.4 */
  570. UCHAR_NAME=0x4005,
  571. /** String property Simple_Case_Folding.
  572. Corresponds to u_foldCase. @stable ICU 2.4 */
  573. UCHAR_SIMPLE_CASE_FOLDING=0x4006,
  574. /** String property Simple_Lowercase_Mapping.
  575. Corresponds to u_tolower. @stable ICU 2.4 */
  576. UCHAR_SIMPLE_LOWERCASE_MAPPING=0x4007,
  577. /** String property Simple_Titlecase_Mapping.
  578. Corresponds to u_totitle. @stable ICU 2.4 */
  579. UCHAR_SIMPLE_TITLECASE_MAPPING=0x4008,
  580. /** String property Simple_Uppercase_Mapping.
  581. Corresponds to u_toupper. @stable ICU 2.4 */
  582. UCHAR_SIMPLE_UPPERCASE_MAPPING=0x4009,
  583. /** String property Titlecase_Mapping.
  584. Corresponds to u_strToTitle in ustring.h. @stable ICU 2.4 */
  585. UCHAR_TITLECASE_MAPPING=0x400A,
  586. #ifndef U_HIDE_DEPRECATED_API
  587. /** String property Unicode_1_Name.
  588. This property is of little practical value.
  589. Beginning with ICU 49, ICU APIs return an empty string for this property.
  590. Corresponds to u_charName(U_UNICODE_10_CHAR_NAME). @deprecated ICU 49 */
  591. UCHAR_UNICODE_1_NAME=0x400B,
  592. #endif /* U_HIDE_DEPRECATED_API */
  593. /** String property Uppercase_Mapping.
  594. Corresponds to u_strToUpper in ustring.h. @stable ICU 2.4 */
  595. UCHAR_UPPERCASE_MAPPING=0x400C,
  596. /** String property Bidi_Paired_Bracket (new in Unicode 6.3).
  597. Corresponds to u_getBidiPairedBracket. @stable ICU 52 */
  598. UCHAR_BIDI_PAIRED_BRACKET=0x400D,
  599. #ifndef U_HIDE_DEPRECATED_API
  600. /**
  601. * One more than the last constant for string Unicode properties.
  602. * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
  603. */
  604. UCHAR_STRING_LIMIT=0x400E,
  605. #endif // U_HIDE_DEPRECATED_API
  606. /** Miscellaneous property Script_Extensions (new in Unicode 6.0).
  607. Some characters are commonly used in multiple scripts.
  608. For more information, see UAX #24: http://www.unicode.org/reports/tr24/.
  609. Corresponds to uscript_hasScript and uscript_getScriptExtensions in uscript.h.
  610. @stable ICU 4.6 */
  611. UCHAR_SCRIPT_EXTENSIONS=0x7000,
  612. /** First constant for Unicode properties with unusual value types. @stable ICU 4.6 */
  613. UCHAR_OTHER_PROPERTY_START=UCHAR_SCRIPT_EXTENSIONS,
  614. #ifndef U_HIDE_DEPRECATED_API
  615. /**
  616. * One more than the last constant for Unicode properties with unusual value types.
  617. * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
  618. */
  619. UCHAR_OTHER_PROPERTY_LIMIT=0x7001,
  620. #endif // U_HIDE_DEPRECATED_API
  621. /** Represents a nonexistent or invalid property or property value. @stable ICU 2.4 */
  622. UCHAR_INVALID_CODE = -1
  623. } UProperty;
  624. /**
  625. * Data for enumerated Unicode general category types.
  626. * See http://www.unicode.org/Public/UNIDATA/UnicodeData.html .
  627. * @stable ICU 2.0
  628. */
  629. typedef enum UCharCategory
  630. {
  631. /*
  632. * Note: UCharCategory constants and their API comments are parsed by preparseucd.py.
  633. * It matches pairs of lines like
  634. * / ** <Unicode 2-letter General_Category value> comment... * /
  635. * U_<[A-Z_]+> = <integer>,
  636. */
  637. /** Non-category for unassigned and non-character code points. @stable ICU 2.0 */
  638. U_UNASSIGNED = 0,
  639. /** Cn "Other, Not Assigned (no characters in [UnicodeData.txt] have this property)" (same as U_UNASSIGNED!) @stable ICU 2.0 */
  640. U_GENERAL_OTHER_TYPES = 0,
  641. /** Lu @stable ICU 2.0 */
  642. U_UPPERCASE_LETTER = 1,
  643. /** Ll @stable ICU 2.0 */
  644. U_LOWERCASE_LETTER = 2,
  645. /** Lt @stable ICU 2.0 */
  646. U_TITLECASE_LETTER = 3,
  647. /** Lm @stable ICU 2.0 */
  648. U_MODIFIER_LETTER = 4,
  649. /** Lo @stable ICU 2.0 */
  650. U_OTHER_LETTER = 5,
  651. /** Mn @stable ICU 2.0 */
  652. U_NON_SPACING_MARK = 6,
  653. /** Me @stable ICU 2.0 */
  654. U_ENCLOSING_MARK = 7,
  655. /** Mc @stable ICU 2.0 */
  656. U_COMBINING_SPACING_MARK = 8,
  657. /** Nd @stable ICU 2.0 */
  658. U_DECIMAL_DIGIT_NUMBER = 9,
  659. /** Nl @stable ICU 2.0 */
  660. U_LETTER_NUMBER = 10,
  661. /** No @stable ICU 2.0 */
  662. U_OTHER_NUMBER = 11,
  663. /** Zs @stable ICU 2.0 */
  664. U_SPACE_SEPARATOR = 12,
  665. /** Zl @stable ICU 2.0 */
  666. U_LINE_SEPARATOR = 13,
  667. /** Zp @stable ICU 2.0 */
  668. U_PARAGRAPH_SEPARATOR = 14,
  669. /** Cc @stable ICU 2.0 */
  670. U_CONTROL_CHAR = 15,
  671. /** Cf @stable ICU 2.0 */
  672. U_FORMAT_CHAR = 16,
  673. /** Co @stable ICU 2.0 */
  674. U_PRIVATE_USE_CHAR = 17,
  675. /** Cs @stable ICU 2.0 */
  676. U_SURROGATE = 18,
  677. /** Pd @stable ICU 2.0 */
  678. U_DASH_PUNCTUATION = 19,
  679. /** Ps @stable ICU 2.0 */
  680. U_START_PUNCTUATION = 20,
  681. /** Pe @stable ICU 2.0 */
  682. U_END_PUNCTUATION = 21,
  683. /** Pc @stable ICU 2.0 */
  684. U_CONNECTOR_PUNCTUATION = 22,
  685. /** Po @stable ICU 2.0 */
  686. U_OTHER_PUNCTUATION = 23,
  687. /** Sm @stable ICU 2.0 */
  688. U_MATH_SYMBOL = 24,
  689. /** Sc @stable ICU 2.0 */
  690. U_CURRENCY_SYMBOL = 25,
  691. /** Sk @stable ICU 2.0 */
  692. U_MODIFIER_SYMBOL = 26,
  693. /** So @stable ICU 2.0 */
  694. U_OTHER_SYMBOL = 27,
  695. /** Pi @stable ICU 2.0 */
  696. U_INITIAL_PUNCTUATION = 28,
  697. /** Pf @stable ICU 2.0 */
  698. U_FINAL_PUNCTUATION = 29,
  699. /**
  700. * One higher than the last enum UCharCategory constant.
  701. * This numeric value is stable (will not change), see
  702. * http://www.unicode.org/policies/stability_policy.html#Property_Value
  703. *
  704. * @stable ICU 2.0
  705. */
  706. U_CHAR_CATEGORY_COUNT
  707. } UCharCategory;
  708. /**
  709. * U_GC_XX_MASK constants are bit flags corresponding to Unicode
  710. * general category values.
  711. * For each category, the nth bit is set if the numeric value of the
  712. * corresponding UCharCategory constant is n.
  713. *
  714. * There are also some U_GC_Y_MASK constants for groups of general categories
  715. * like L for all letter categories.
  716. *
  717. * @see u_charType
  718. * @see U_GET_GC_MASK
  719. * @see UCharCategory
  720. * @stable ICU 2.1
  721. */
  722. #define U_GC_CN_MASK U_MASK(U_GENERAL_OTHER_TYPES)
  723. /** Mask constant for a UCharCategory. @stable ICU 2.1 */
  724. #define U_GC_LU_MASK U_MASK(U_UPPERCASE_LETTER)
  725. /** Mask constant for a UCharCategory. @stable ICU 2.1 */
  726. #define U_GC_LL_MASK U_MASK(U_LOWERCASE_LETTER)
  727. /** Mask constant for a UCharCategory. @stable ICU 2.1 */
  728. #define U_GC_LT_MASK U_MASK(U_TITLECASE_LETTER)
  729. /** Mask constant for a UCharCategory. @stable ICU 2.1 */
  730. #define U_GC_LM_MASK U_MASK(U_MODIFIER_LETTER)
  731. /** Mask constant for a UCharCategory. @stable ICU 2.1 */
  732. #define U_GC_LO_MASK U_MASK(U_OTHER_LETTER)
  733. /** Mask constant for a UCharCategory. @stable ICU 2.1 */
  734. #define U_GC_MN_MASK U_MASK(U_NON_SPACING_MARK)
  735. /** Mask constant for a UCharCategory. @stable ICU 2.1 */
  736. #define U_GC_ME_MASK U_MASK(U_ENCLOSING_MARK)
  737. /** Mask constant for a UCharCategory. @stable ICU 2.1 */
  738. #define U_GC_MC_MASK U_MASK(U_COMBINING_SPACING_MARK)
  739. /** Mask constant for a UCharCategory. @stable ICU 2.1 */
  740. #define U_GC_ND_MASK U_MASK(U_DECIMAL_DIGIT_NUMBER)
  741. /** Mask constant for a UCharCategory. @stable ICU 2.1 */
  742. #define U_GC_NL_MASK U_MASK(U_LETTER_NUMBER)
  743. /** Mask constant for a UCharCategory. @stable ICU 2.1 */
  744. #define U_GC_NO_MASK U_MASK(U_OTHER_NUMBER)
  745. /** Mask constant for a UCharCategory. @stable ICU 2.1 */
  746. #define U_GC_ZS_MASK U_MASK(U_SPACE_SEPARATOR)
  747. /** Mask constant for a UCharCategory. @stable ICU 2.1 */
  748. #define U_GC_ZL_MASK U_MASK(U_LINE_SEPARATOR)
  749. /** Mask constant for a UCharCategory. @stable ICU 2.1 */
  750. #define U_GC_ZP_MASK U_MASK(U_PARAGRAPH_SEPARATOR)
  751. /** Mask constant for a UCharCategory. @stable ICU 2.1 */
  752. #define U_GC_CC_MASK U_MASK(U_CONTROL_CHAR)
  753. /** Mask constant for a UCharCategory. @stable ICU 2.1 */
  754. #define U_GC_CF_MASK U_MASK(U_FORMAT_CHAR)
  755. /** Mask constant for a UCharCategory. @stable ICU 2.1 */
  756. #define U_GC_CO_MASK U_MASK(U_PRIVATE_USE_CHAR)
  757. /** Mask constant for a UCharCategory. @stable ICU 2.1 */
  758. #define U_GC_CS_MASK U_MASK(U_SURROGATE)
  759. /** Mask constant for a UCharCategory. @stable ICU 2.1 */
  760. #define U_GC_PD_MASK U_MASK(U_DASH_PUNCTUATION)
  761. /** Mask constant for a UCharCategory. @stable ICU 2.1 */
  762. #define U_GC_PS_MASK U_MASK(U_START_PUNCTUATION)
  763. /** Mask constant for a UCharCategory. @stable ICU 2.1 */
  764. #define U_GC_PE_MASK U_MASK(U_END_PUNCTUATION)
  765. /** Mask constant for a UCharCategory. @stable ICU 2.1 */
  766. #define U_GC_PC_MASK U_MASK(U_CONNECTOR_PUNCTUATION)
  767. /** Mask constant for a UCharCategory. @stable ICU 2.1 */
  768. #define U_GC_PO_MASK U_MASK(U_OTHER_PUNCTUATION)
  769. /** Mask constant for a UCharCategory. @stable ICU 2.1 */
  770. #define U_GC_SM_MASK U_MASK(U_MATH_SYMBOL)
  771. /** Mask constant for a UCharCategory. @stable ICU 2.1 */
  772. #define U_GC_SC_MASK U_MASK(U_CURRENCY_SYMBOL)
  773. /** Mask constant for a UCharCategory. @stable ICU 2.1 */
  774. #define U_GC_SK_MASK U_MASK(U_MODIFIER_SYMBOL)
  775. /** Mask constant for a UCharCategory. @stable ICU 2.1 */
  776. #define U_GC_SO_MASK U_MASK(U_OTHER_SYMBOL)
  777. /** Mask constant for a UCharCategory. @stable ICU 2.1 */
  778. #define U_GC_PI_MASK U_MASK(U_INITIAL_PUNCTUATION)
  779. /** Mask constant for a UCharCategory. @stable ICU 2.1 */
  780. #define U_GC_PF_MASK U_MASK(U_FINAL_PUNCTUATION)
  781. /** Mask constant for multiple UCharCategory bits (L Letters). @stable ICU 2.1 */
  782. #define U_GC_L_MASK \
  783. (U_GC_LU_MASK|U_GC_LL_MASK|U_GC_LT_MASK|U_GC_LM_MASK|U_GC_LO_MASK)
  784. /** Mask constant for multiple UCharCategory bits (LC Cased Letters). @stable ICU 2.1 */
  785. #define U_GC_LC_MASK \
  786. (U_GC_LU_MASK|U_GC_LL_MASK|U_GC_LT_MASK)
  787. /** Mask constant for multiple UCharCategory bits (M Marks). @stable ICU 2.1 */
  788. #define U_GC_M_MASK (U_GC_MN_MASK|U_GC_ME_MASK|U_GC_MC_MASK)
  789. /** Mask constant for multiple UCharCategory bits (N Numbers). @stable ICU 2.1 */
  790. #define U_GC_N_MASK (U_GC_ND_MASK|U_GC_NL_MASK|U_GC_NO_MASK)
  791. /** Mask constant for multiple UCharCategory bits (Z Separators). @stable ICU 2.1 */
  792. #define U_GC_Z_MASK (U_GC_ZS_MASK|U_GC_ZL_MASK|U_GC_ZP_MASK)
  793. /** Mask constant for multiple UCharCategory bits (C Others). @stable ICU 2.1 */
  794. #define U_GC_C_MASK \
  795. (U_GC_CN_MASK|U_GC_CC_MASK|U_GC_CF_MASK|U_GC_CO_MASK|U_GC_CS_MASK)
  796. /** Mask constant for multiple UCharCategory bits (P Punctuation). @stable ICU 2.1 */
  797. #define U_GC_P_MASK \
  798. (U_GC_PD_MASK|U_GC_PS_MASK|U_GC_PE_MASK|U_GC_PC_MASK|U_GC_PO_MASK| \
  799. U_GC_PI_MASK|U_GC_PF_MASK)
  800. /** Mask constant for multiple UCharCategory bits (S Symbols). @stable ICU 2.1 */
  801. #define U_GC_S_MASK (U_GC_SM_MASK|U_GC_SC_MASK|U_GC_SK_MASK|U_GC_SO_MASK)
  802. /**
  803. * This specifies the language directional property of a character set.
  804. * @stable ICU 2.0
  805. */
  806. typedef enum UCharDirection {
  807. /*
  808. * Note: UCharDirection constants and their API comments are parsed by preparseucd.py.
  809. * It matches pairs of lines like
  810. * / ** <Unicode 1..3-letter Bidi_Class value> comment... * /
  811. * U_<[A-Z_]+> = <integer>,
  812. */
  813. /** L @stable ICU 2.0 */
  814. U_LEFT_TO_RIGHT = 0,
  815. /** R @stable ICU 2.0 */
  816. U_RIGHT_TO_LEFT = 1,
  817. /** EN @stable ICU 2.0 */
  818. U_EUROPEAN_NUMBER = 2,
  819. /** ES @stable ICU 2.0 */
  820. U_EUROPEAN_NUMBER_SEPARATOR = 3,
  821. /** ET @stable ICU 2.0 */
  822. U_EUROPEAN_NUMBER_TERMINATOR = 4,
  823. /** AN @stable ICU 2.0 */
  824. U_ARABIC_NUMBER = 5,
  825. /** CS @stable ICU 2.0 */
  826. U_COMMON_NUMBER_SEPARATOR = 6,
  827. /** B @stable ICU 2.0 */
  828. U_BLOCK_SEPARATOR = 7,
  829. /** S @stable ICU 2.0 */
  830. U_SEGMENT_SEPARATOR = 8,
  831. /** WS @stable ICU 2.0 */
  832. U_WHITE_SPACE_NEUTRAL = 9,
  833. /** ON @stable ICU 2.0 */
  834. U_OTHER_NEUTRAL = 10,
  835. /** LRE @stable ICU 2.0 */
  836. U_LEFT_TO_RIGHT_EMBEDDING = 11,
  837. /** LRO @stable ICU 2.0 */
  838. U_LEFT_TO_RIGHT_OVERRIDE = 12,
  839. /** AL @stable ICU 2.0 */
  840. U_RIGHT_TO_LEFT_ARABIC = 13,
  841. /** RLE @stable ICU 2.0 */
  842. U_RIGHT_TO_LEFT_EMBEDDING = 14,
  843. /** RLO @stable ICU 2.0 */
  844. U_RIGHT_TO_LEFT_OVERRIDE = 15,
  845. /** PDF @stable ICU 2.0 */
  846. U_POP_DIRECTIONAL_FORMAT = 16,
  847. /** NSM @stable ICU 2.0 */
  848. U_DIR_NON_SPACING_MARK = 17,
  849. /** BN @stable ICU 2.0 */
  850. U_BOUNDARY_NEUTRAL = 18,
  851. /** FSI @stable ICU 52 */
  852. U_FIRST_STRONG_ISOLATE = 19,
  853. /** LRI @stable ICU 52 */
  854. U_LEFT_TO_RIGHT_ISOLATE = 20,
  855. /** RLI @stable ICU 52 */
  856. U_RIGHT_TO_LEFT_ISOLATE = 21,
  857. /** PDI @stable ICU 52 */
  858. U_POP_DIRECTIONAL_ISOLATE = 22,
  859. #ifndef U_HIDE_DEPRECATED_API
  860. /**
  861. * One more than the highest UCharDirection value.
  862. * The highest value is available via u_getIntPropertyMaxValue(UCHAR_BIDI_CLASS).
  863. *
  864. * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
  865. */
  866. U_CHAR_DIRECTION_COUNT
  867. #endif // U_HIDE_DEPRECATED_API
  868. } UCharDirection;
  869. /**
  870. * Bidi Paired Bracket Type constants.
  871. *
  872. * @see UCHAR_BIDI_PAIRED_BRACKET_TYPE
  873. * @stable ICU 52
  874. */
  875. typedef enum UBidiPairedBracketType {
  876. /*
  877. * Note: UBidiPairedBracketType constants are parsed by preparseucd.py.
  878. * It matches lines like
  879. * U_BPT_<Unicode Bidi_Paired_Bracket_Type value name>
  880. */
  881. /** Not a paired bracket. @stable ICU 52 */
  882. U_BPT_NONE,
  883. /** Open paired bracket. @stable ICU 52 */
  884. U_BPT_OPEN,
  885. /** Close paired bracket. @stable ICU 52 */
  886. U_BPT_CLOSE,
  887. #ifndef U_HIDE_DEPRECATED_API
  888. /**
  889. * One more than the highest normal UBidiPairedBracketType value.
  890. * The highest value is available via u_getIntPropertyMaxValue(UCHAR_BIDI_PAIRED_BRACKET_TYPE).
  891. *
  892. * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
  893. */
  894. U_BPT_COUNT /* 3 */
  895. #endif // U_HIDE_DEPRECATED_API
  896. } UBidiPairedBracketType;
  897. /**
  898. * Constants for Unicode blocks, see the Unicode Data file Blocks.txt
  899. * @stable ICU 2.0
  900. */
  901. enum UBlockCode {
  902. /*
  903. * Note: UBlockCode constants are parsed by preparseucd.py.
  904. * It matches lines like
  905. * UBLOCK_<Unicode Block value name> = <integer>,
  906. */
  907. /** New No_Block value in Unicode 4. @stable ICU 2.6 */
  908. UBLOCK_NO_BLOCK = 0, /*[none]*/ /* Special range indicating No_Block */
  909. /** @stable ICU 2.0 */
  910. UBLOCK_BASIC_LATIN = 1, /*[0000]*/
  911. /** @stable ICU 2.0 */
  912. UBLOCK_LATIN_1_SUPPLEMENT=2, /*[0080]*/
  913. /** @stable ICU 2.0 */
  914. UBLOCK_LATIN_EXTENDED_A =3, /*[0100]*/
  915. /** @stable ICU 2.0 */
  916. UBLOCK_LATIN_EXTENDED_B =4, /*[0180]*/
  917. /** @stable ICU 2.0 */
  918. UBLOCK_IPA_EXTENSIONS =5, /*[0250]*/
  919. /** @stable ICU 2.0 */
  920. UBLOCK_SPACING_MODIFIER_LETTERS =6, /*[02B0]*/
  921. /** @stable ICU 2.0 */
  922. UBLOCK_COMBINING_DIACRITICAL_MARKS =7, /*[0300]*/
  923. /**
  924. * Unicode 3.2 renames this block to "Greek and Coptic".
  925. * @stable ICU 2.0
  926. */
  927. UBLOCK_GREEK =8, /*[0370]*/
  928. /** @stable ICU 2.0 */
  929. UBLOCK_CYRILLIC =9, /*[0400]*/
  930. /** @stable ICU 2.0 */
  931. UBLOCK_ARMENIAN =10, /*[0530]*/
  932. /** @stable ICU 2.0 */
  933. UBLOCK_HEBREW =11, /*[0590]*/
  934. /** @stable ICU 2.0 */
  935. UBLOCK_ARABIC =12, /*[0600]*/
  936. /** @stable ICU 2.0 */
  937. UBLOCK_SYRIAC =13, /*[0700]*/
  938. /** @stable ICU 2.0 */
  939. UBLOCK_THAANA =14, /*[0780]*/
  940. /** @stable ICU 2.0 */
  941. UBLOCK_DEVANAGARI =15, /*[0900]*/
  942. /** @stable ICU 2.0 */
  943. UBLOCK_BENGALI =16, /*[0980]*/
  944. /** @stable ICU 2.0 */
  945. UBLOCK_GURMUKHI =17, /*[0A00]*/
  946. /** @stable ICU 2.0 */
  947. UBLOCK_GUJARATI =18, /*[0A80]*/
  948. /** @stable ICU 2.0 */
  949. UBLOCK_ORIYA =19, /*[0B00]*/
  950. /** @stable ICU 2.0 */
  951. UBLOCK_TAMIL =20, /*[0B80]*/
  952. /** @stable ICU 2.0 */
  953. UBLOCK_TELUGU =21, /*[0C00]*/
  954. /** @stable ICU 2.0 */
  955. UBLOCK_KANNADA =22, /*[0C80]*/
  956. /** @stable ICU 2.0 */
  957. UBLOCK_MALAYALAM =23, /*[0D00]*/
  958. /** @stable ICU 2.0 */
  959. UBLOCK_SINHALA =24, /*[0D80]*/
  960. /** @stable ICU 2.0 */
  961. UBLOCK_THAI =25, /*[0E00]*/
  962. /** @stable ICU 2.0 */
  963. UBLOCK_LAO =26, /*[0E80]*/
  964. /** @stable ICU 2.0 */
  965. UBLOCK_TIBETAN =27, /*[0F00]*/
  966. /** @stable ICU 2.0 */
  967. UBLOCK_MYANMAR =28, /*[1000]*/
  968. /** @stable ICU 2.0 */
  969. UBLOCK_GEORGIAN =29, /*[10A0]*/
  970. /** @stable ICU 2.0 */
  971. UBLOCK_HANGUL_JAMO =30, /*[1100]*/
  972. /** @stable ICU 2.0 */
  973. UBLOCK_ETHIOPIC =31, /*[1200]*/
  974. /** @stable ICU 2.0 */
  975. UBLOCK_CHEROKEE =32, /*[13A0]*/
  976. /** @stable ICU 2.0 */
  977. UBLOCK_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS =33, /*[1400]*/
  978. /** @stable ICU 2.0 */
  979. UBLOCK_OGHAM =34, /*[1680]*/
  980. /** @stable ICU 2.0 */
  981. UBLOCK_RUNIC =35, /*[16A0]*/
  982. /** @stable ICU 2.0 */
  983. UBLOCK_KHMER =36, /*[1780]*/
  984. /** @stable ICU 2.0 */
  985. UBLOCK_MONGOLIAN =37, /*[1800]*/
  986. /** @stable ICU 2.0 */
  987. UBLOCK_LATIN_EXTENDED_ADDITIONAL =38, /*[1E00]*/
  988. /** @stable ICU 2.0 */
  989. UBLOCK_GREEK_EXTENDED =39, /*[1F00]*/
  990. /** @stable ICU 2.0 */
  991. UBLOCK_GENERAL_PUNCTUATION =40, /*[2000]*/
  992. /** @stable ICU 2.0 */
  993. UBLOCK_SUPERSCRIPTS_AND_SUBSCRIPTS =41, /*[2070]*/
  994. /** @stable ICU 2.0 */
  995. UBLOCK_CURRENCY_SYMBOLS =42, /*[20A0]*/
  996. /**
  997. * Unicode 3.2 renames this block to "Combining Diacritical Marks for Symbols".
  998. * @stable ICU 2.0
  999. */
  1000. UBLOCK_COMBINING_MARKS_FOR_SYMBOLS =43, /*[20D0]*/
  1001. /** @stable ICU 2.0 */
  1002. UBLOCK_LETTERLIKE_SYMBOLS =44, /*[2100]*/
  1003. /** @stable ICU 2.0 */
  1004. UBLOCK_NUMBER_FORMS =45, /*[2150]*/
  1005. /** @stable ICU 2.0 */
  1006. UBLOCK_ARROWS =46, /*[2190]*/
  1007. /** @stable ICU 2.0 */
  1008. UBLOCK_MATHEMATICAL_OPERATORS =47, /*[2200]*/
  1009. /** @stable ICU 2.0 */
  1010. UBLOCK_MISCELLANEOUS_TECHNICAL =48, /*[2300]*/
  1011. /** @stable ICU 2.0 */
  1012. UBLOCK_CONTROL_PICTURES =49, /*[2400]*/
  1013. /** @stable ICU 2.0 */
  1014. UBLOCK_OPTICAL_CHARACTER_RECOGNITION =50, /*[2440]*/
  1015. /** @stable ICU 2.0 */
  1016. UBLOCK_ENCLOSED_ALPHANUMERICS =51, /*[2460]*/
  1017. /** @stable ICU 2.0 */
  1018. UBLOCK_BOX_DRAWING =52, /*[2500]*/
  1019. /** @stable ICU 2.0 */
  1020. UBLOCK_BLOCK_ELEMENTS =53, /*[2580]*/
  1021. /** @stable ICU 2.0 */
  1022. UBLOCK_GEOMETRIC_SHAPES =54, /*[25A0]*/
  1023. /** @stable ICU 2.0 */
  1024. UBLOCK_MISCELLANEOUS_SYMBOLS =55, /*[2600]*/
  1025. /** @stable ICU 2.0 */
  1026. UBLOCK_DINGBATS =56, /*[2700]*/
  1027. /** @stable ICU 2.0 */
  1028. UBLOCK_BRAILLE_PATTERNS =57, /*[2800]*/
  1029. /** @stable ICU 2.0 */
  1030. UBLOCK_CJK_RADICALS_SUPPLEMENT =58, /*[2E80]*/
  1031. /** @stable ICU 2.0 */
  1032. UBLOCK_KANGXI_RADICALS =59, /*[2F00]*/
  1033. /** @stable ICU 2.0 */
  1034. UBLOCK_IDEOGRAPHIC_DESCRIPTION_CHARACTERS =60, /*[2FF0]*/
  1035. /** @stable ICU 2.0 */
  1036. UBLOCK_CJK_SYMBOLS_AND_PUNCTUATION =61, /*[3000]*/
  1037. /** @stable ICU 2.0 */
  1038. UBLOCK_HIRAGANA =62, /*[3040]*/
  1039. /** @stable ICU 2.0 */
  1040. UBLOCK_KATAKANA =63, /*[30A0]*/
  1041. /** @stable ICU 2.0 */
  1042. UBLOCK_BOPOMOFO =64, /*[3100]*/
  1043. /** @stable ICU 2.0 */
  1044. UBLOCK_HANGUL_COMPATIBILITY_JAMO =65, /*[3130]*/
  1045. /** @stable ICU 2.0 */
  1046. UBLOCK_KANBUN =66, /*[3190]*/
  1047. /** @stable ICU 2.0 */
  1048. UBLOCK_BOPOMOFO_EXTENDED =67, /*[31A0]*/
  1049. /** @stable ICU 2.0 */
  1050. UBLOCK_ENCLOSED_CJK_LETTERS_AND_MONTHS =68, /*[3200]*/
  1051. /** @stable ICU 2.0 */
  1052. UBLOCK_CJK_COMPATIBILITY =69, /*[3300]*/
  1053. /** @stable ICU 2.0 */
  1054. UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A =70, /*[3400]*/
  1055. /** @stable ICU 2.0 */
  1056. UBLOCK_CJK_UNIFIED_IDEOGRAPHS =71, /*[4E00]*/
  1057. /** @stable ICU 2.0 */
  1058. UBLOCK_YI_SYLLABLES =72, /*[A000]*/
  1059. /** @stable ICU 2.0 */
  1060. UBLOCK_YI_RADICALS =73, /*[A490]*/
  1061. /** @stable ICU 2.0 */
  1062. UBLOCK_HANGUL_SYLLABLES =74, /*[AC00]*/
  1063. /** @stable ICU 2.0 */
  1064. UBLOCK_HIGH_SURROGATES =75, /*[D800]*/
  1065. /** @stable ICU 2.0 */
  1066. UBLOCK_HIGH_PRIVATE_USE_SURROGATES =76, /*[DB80]*/
  1067. /** @stable ICU 2.0 */
  1068. UBLOCK_LOW_SURROGATES =77, /*[DC00]*/
  1069. /**
  1070. * Same as UBLOCK_PRIVATE_USE.
  1071. * Until Unicode 3.1.1, the corresponding block name was "Private Use",
  1072. * and multiple code point ranges had this block.
  1073. * Unicode 3.2 renames the block for the BMP PUA to "Private Use Area" and
  1074. * adds separate blocks for the supplementary PUAs.
  1075. *
  1076. * @stable ICU 2.0
  1077. */
  1078. UBLOCK_PRIVATE_USE_AREA =78, /*[E000]*/
  1079. /**
  1080. * Same as UBLOCK_PRIVATE_USE_AREA.
  1081. * Until Unicode 3.1.1, the corresponding block name was "Private Use",
  1082. * and multiple code point ranges had this block.
  1083. * Unicode 3.2 renames the block for the BMP PUA to "Private Use Area" and
  1084. * adds separate blocks for the supplementary PUAs.
  1085. *
  1086. * @stable ICU 2.0
  1087. */
  1088. UBLOCK_PRIVATE_USE = UBLOCK_PRIVATE_USE_AREA,
  1089. /** @stable ICU 2.0 */
  1090. UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS =79, /*[F900]*/
  1091. /** @stable ICU 2.0 */
  1092. UBLOCK_ALPHABETIC_PRESENTATION_FORMS =80, /*[FB00]*/
  1093. /** @stable ICU 2.0 */
  1094. UBLOCK_ARABIC_PRESENTATION_FORMS_A =81, /*[FB50]*/
  1095. /** @stable ICU 2.0 */
  1096. UBLOCK_COMBINING_HALF_MARKS =82, /*[FE20]*/
  1097. /** @stable ICU 2.0 */
  1098. UBLOCK_CJK_COMPATIBILITY_FORMS =83, /*[FE30]*/
  1099. /** @stable ICU 2.0 */
  1100. UBLOCK_SMALL_FORM_VARIANTS =84, /*[FE50]*/
  1101. /** @stable ICU 2.0 */
  1102. UBLOCK_ARABIC_PRESENTATION_FORMS_B =85, /*[FE70]*/
  1103. /** @stable ICU 2.0 */
  1104. UBLOCK_SPECIALS =86, /*[FFF0]*/
  1105. /** @stable ICU 2.0 */
  1106. UBLOCK_HALFWIDTH_AND_FULLWIDTH_FORMS =87, /*[FF00]*/
  1107. /* New blocks in Unicode 3.1 */
  1108. /** @stable ICU 2.0 */
  1109. UBLOCK_OLD_ITALIC = 88, /*[10300]*/
  1110. /** @stable ICU 2.0 */
  1111. UBLOCK_GOTHIC = 89, /*[10330]*/
  1112. /** @stable ICU 2.0 */
  1113. UBLOCK_DESERET = 90, /*[10400]*/
  1114. /** @stable ICU 2.0 */
  1115. UBLOCK_BYZANTINE_MUSICAL_SYMBOLS = 91, /*[1D000]*/
  1116. /** @stable ICU 2.0 */
  1117. UBLOCK_MUSICAL_SYMBOLS = 92, /*[1D100]*/
  1118. /** @stable ICU 2.0 */
  1119. UBLOCK_MATHEMATICAL_ALPHANUMERIC_SYMBOLS = 93, /*[1D400]*/
  1120. /** @stable ICU 2.0 */
  1121. UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B = 94, /*[20000]*/
  1122. /** @stable ICU 2.0 */
  1123. UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT = 95, /*[2F800]*/
  1124. /** @stable ICU 2.0 */
  1125. UBLOCK_TAGS = 96, /*[E0000]*/
  1126. /* New blocks in Unicode 3.2 */
  1127. /** @stable ICU 3.0 */
  1128. UBLOCK_CYRILLIC_SUPPLEMENT = 97, /*[0500]*/
  1129. /**
  1130. * Unicode 4.0.1 renames the "Cyrillic Supplementary" block to "Cyrillic Supplement".
  1131. * @stable ICU 2.2
  1132. */
  1133. UBLOCK_CYRILLIC_SUPPLEMENTARY = UBLOCK_CYRILLIC_SUPPLEMENT,
  1134. /** @stable ICU 2.2 */
  1135. UBLOCK_TAGALOG = 98, /*[1700]*/
  1136. /** @stable ICU 2.2 */
  1137. UBLOCK_HANUNOO = 99, /*[1720]*/
  1138. /** @stable ICU 2.2 */
  1139. UBLOCK_BUHID = 100, /*[1740]*/
  1140. /** @stable ICU 2.2 */
  1141. UBLOCK_TAGBANWA = 101, /*[1760]*/
  1142. /** @stable ICU 2.2 */
  1143. UBLOCK_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A = 102, /*[27C0]*/
  1144. /** @stable ICU 2.2 */
  1145. UBLOCK_SUPPLEMENTAL_ARROWS_A = 103, /*[27F0]*/
  1146. /** @stable ICU 2.2 */
  1147. UBLOCK_SUPPLEMENTAL_ARROWS_B = 104, /*[2900]*/
  1148. /** @stable ICU 2.2 */
  1149. UBLOCK_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B = 105, /*[2980]*/
  1150. /** @stable ICU 2.2 */
  1151. UBLOCK_SUPPLEMENTAL_MATHEMATICAL_OPERATORS = 106, /*[2A00]*/
  1152. /** @stable ICU 2.2 */
  1153. UBLOCK_KATAKANA_PHONETIC_EXTENSIONS = 107, /*[31F0]*/
  1154. /** @stable ICU 2.2 */
  1155. UBLOCK_VARIATION_SELECTORS = 108, /*[FE00]*/
  1156. /** @stable ICU 2.2 */
  1157. UBLOCK_SUPPLEMENTARY_PRIVATE_USE_AREA_A = 109, /*[F0000]*/
  1158. /** @stable ICU 2.2 */
  1159. UBLOCK_SUPPLEMENTARY_PRIVATE_USE_AREA_B = 110, /*[100000]*/
  1160. /* New blocks in Unicode 4 */
  1161. /** @stable ICU 2.6 */
  1162. UBLOCK_LIMBU = 111, /*[1900]*/
  1163. /** @stable ICU 2.6 */
  1164. UBLOCK_TAI_LE = 112, /*[1950]*/
  1165. /** @stable ICU 2.6 */
  1166. UBLOCK_KHMER_SYMBOLS = 113, /*[19E0]*/
  1167. /** @stable ICU 2.6 */
  1168. UBLOCK_PHONETIC_EXTENSIONS = 114, /*[1D00]*/
  1169. /** @stable ICU 2.6 */
  1170. UBLOCK_MISCELLANEOUS_SYMBOLS_AND_ARROWS = 115, /*[2B00]*/
  1171. /** @stable ICU 2.6 */
  1172. UBLOCK_YIJING_HEXAGRAM_SYMBOLS = 116, /*[4DC0]*/
  1173. /** @stable ICU 2.6 */
  1174. UBLOCK_LINEAR_B_SYLLABARY = 117, /*[10000]*/
  1175. /** @stable ICU 2.6 */
  1176. UBLOCK_LINEAR_B_IDEOGRAMS = 118, /*[10080]*/
  1177. /** @stable ICU 2.6 */
  1178. UBLOCK_AEGEAN_NUMBERS = 119, /*[10100]*/
  1179. /** @stable ICU 2.6 */
  1180. UBLOCK_UGARITIC = 120, /*[10380]*/
  1181. /** @stable ICU 2.6 */
  1182. UBLOCK_SHAVIAN = 121, /*[10450]*/
  1183. /** @stable ICU 2.6 */
  1184. UBLOCK_OSMANYA = 122, /*[10480]*/
  1185. /** @stable ICU 2.6 */
  1186. UBLOCK_CYPRIOT_SYLLABARY = 123, /*[10800]*/
  1187. /** @stable ICU 2.6 */
  1188. UBLOCK_TAI_XUAN_JING_SYMBOLS = 124, /*[1D300]*/
  1189. /** @stable ICU 2.6 */
  1190. UBLOCK_VARIATION_SELECTORS_SUPPLEMENT = 125, /*[E0100]*/
  1191. /* New blocks in Unicode 4.1 */
  1192. /** @stable ICU 3.4 */
  1193. UBLOCK_ANCIENT_GREEK_MUSICAL_NOTATION = 126, /*[1D200]*/
  1194. /** @stable ICU 3.4 */
  1195. UBLOCK_ANCIENT_GREEK_NUMBERS = 127, /*[10140]*/
  1196. /** @stable ICU 3.4 */
  1197. UBLOCK_ARABIC_SUPPLEMENT = 128, /*[0750]*/
  1198. /** @stable ICU 3.4 */
  1199. UBLOCK_BUGINESE = 129, /*[1A00]*/
  1200. /** @stable ICU 3.4 */
  1201. UBLOCK_CJK_STROKES = 130, /*[31C0]*/
  1202. /** @stable ICU 3.4 */
  1203. UBLOCK_COMBINING_DIACRITICAL_MARKS_SUPPLEMENT = 131, /*[1DC0]*/
  1204. /** @stable ICU 3.4 */
  1205. UBLOCK_COPTIC = 132, /*[2C80]*/
  1206. /** @stable ICU 3.4 */
  1207. UBLOCK_ETHIOPIC_EXTENDED = 133, /*[2D80]*/
  1208. /** @stable ICU 3.4 */
  1209. UBLOCK_ETHIOPIC_SUPPLEMENT = 134, /*[1380]*/
  1210. /** @stable ICU 3.4 */
  1211. UBLOCK_GEORGIAN_SUPPLEMENT = 135, /*[2D00]*/
  1212. /** @stable ICU 3.4 */
  1213. UBLOCK_GLAGOLITIC = 136, /*[2C00]*/
  1214. /** @stable ICU 3.4 */
  1215. UBLOCK_KHAROSHTHI = 137, /*[10A00]*/
  1216. /** @stable ICU 3.4 */
  1217. UBLOCK_MODIFIER_TONE_LETTERS = 138, /*[A700]*/
  1218. /** @stable ICU 3.4 */
  1219. UBLOCK_NEW_TAI_LUE = 139, /*[1980]*/
  1220. /** @stable ICU 3.4 */
  1221. UBLOCK_OLD_PERSIAN = 140, /*[103A0]*/
  1222. /** @stable ICU 3.4 */
  1223. UBLOCK_PHONETIC_EXTENSIONS_SUPPLEMENT = 141, /*[1D80]*/
  1224. /** @stable ICU 3.4 */
  1225. UBLOCK_SUPPLEMENTAL_PUNCTUATION = 142, /*[2E00]*/
  1226. /** @stable ICU 3.4 */
  1227. UBLOCK_SYLOTI_NAGRI = 143, /*[A800]*/
  1228. /** @stable ICU 3.4 */
  1229. UBLOCK_TIFINAGH = 144, /*[2D30]*/
  1230. /** @stable ICU 3.4 */
  1231. UBLOCK_VERTICAL_FORMS = 145, /*[FE10]*/
  1232. /* New blocks in Unicode 5.0 */
  1233. /** @stable ICU 3.6 */
  1234. UBLOCK_NKO = 146, /*[07C0]*/
  1235. /** @stable ICU 3.6 */
  1236. UBLOCK_BALINESE = 147, /*[1B00]*/
  1237. /** @stable ICU 3.6 */
  1238. UBLOCK_LATIN_EXTENDED_C = 148, /*[2C60]*/
  1239. /** @stable ICU 3.6 */
  1240. UBLOCK_LATIN_EXTENDED_D = 149, /*[A720]*/
  1241. /** @stable ICU 3.6 */
  1242. UBLOCK_PHAGS_PA = 150, /*[A840]*/
  1243. /** @stable ICU 3.6 */
  1244. UBLOCK_PHOENICIAN = 151, /*[10900]*/
  1245. /** @stable ICU 3.6 */
  1246. UBLOCK_CUNEIFORM = 152, /*[12000]*/
  1247. /** @stable ICU 3.6 */
  1248. UBLOCK_CUNEIFORM_NUMBERS_AND_PUNCTUATION = 153, /*[12400]*/
  1249. /** @stable ICU 3.6 */
  1250. UBLOCK_COUNTING_ROD_NUMERALS = 154, /*[1D360]*/
  1251. /* New blocks in Unicode 5.1 */
  1252. /** @stable ICU 4.0 */
  1253. UBLOCK_SUNDANESE = 155, /*[1B80]*/
  1254. /** @stable ICU 4.0 */
  1255. UBLOCK_LEPCHA = 156, /*[1C00]*/
  1256. /** @stable ICU 4.0 */
  1257. UBLOCK_OL_CHIKI = 157, /*[1C50]*/
  1258. /** @stable ICU 4.0 */
  1259. UBLOCK_CYRILLIC_EXTENDED_A = 158, /*[2DE0]*/
  1260. /** @stable ICU 4.0 */
  1261. UBLOCK_VAI = 159, /*[A500]*/
  1262. /** @stable ICU 4.0 */
  1263. UBLOCK_CYRILLIC_EXTENDED_B = 160, /*[A640]*/
  1264. /** @stable ICU 4.0 */
  1265. UBLOCK_SAURASHTRA = 161, /*[A880]*/
  1266. /** @stable ICU 4.0 */
  1267. UBLOCK_KAYAH_LI = 162, /*[A900]*/
  1268. /** @stable ICU 4.0 */
  1269. UBLOCK_REJANG = 163, /*[A930]*/
  1270. /** @stable ICU 4.0 */
  1271. UBLOCK_CHAM = 164, /*[AA00]*/
  1272. /** @stable ICU 4.0 */
  1273. UBLOCK_ANCIENT_SYMBOLS = 165, /*[10190]*/
  1274. /** @stable ICU 4.0 */
  1275. UBLOCK_PHAISTOS_DISC = 166, /*[101D0]*/
  1276. /** @stable ICU 4.0 */
  1277. UBLOCK_LYCIAN = 167, /*[10280]*/
  1278. /** @stable ICU 4.0 */
  1279. UBLOCK_CARIAN = 168, /*[102A0]*/
  1280. /** @stable ICU 4.0 */
  1281. UBLOCK_LYDIAN = 169, /*[10920]*/
  1282. /** @stable ICU 4.0 */
  1283. UBLOCK_MAHJONG_TILES = 170, /*[1F000]*/
  1284. /** @stable ICU 4.0 */
  1285. UBLOCK_DOMINO_TILES = 171, /*[1F030]*/
  1286. /* New blocks in Unicode 5.2 */
  1287. /** @stable ICU 4.4 */
  1288. UBLOCK_SAMARITAN = 172, /*[0800]*/
  1289. /** @stable ICU 4.4 */
  1290. UBLOCK_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED = 173, /*[18B0]*/
  1291. /** @stable ICU 4.4 */
  1292. UBLOCK_TAI_THAM = 174, /*[1A20]*/
  1293. /** @stable ICU 4.4 */
  1294. UBLOCK_VEDIC_EXTENSIONS = 175, /*[1CD0]*/
  1295. /** @stable ICU 4.4 */
  1296. UBLOCK_LISU = 176, /*[A4D0]*/
  1297. /** @stable ICU 4.4 */
  1298. UBLOCK_BAMUM = 177, /*[A6A0]*/
  1299. /** @stable ICU 4.4 */
  1300. UBLOCK_COMMON_INDIC_NUMBER_FORMS = 178, /*[A830]*/
  1301. /** @stable ICU 4.4 */
  1302. UBLOCK_DEVANAGARI_EXTENDED = 179, /*[A8E0]*/
  1303. /** @stable ICU 4.4 */
  1304. UBLOCK_HANGUL_JAMO_EXTENDED_A = 180, /*[A960]*/
  1305. /** @stable ICU 4.4 */
  1306. UBLOCK_JAVANESE = 181, /*[A980]*/
  1307. /** @stable ICU 4.4 */
  1308. UBLOCK_MYANMAR_EXTENDED_A = 182, /*[AA60]*/
  1309. /** @stable ICU 4.4 */
  1310. UBLOCK_TAI_VIET = 183, /*[AA80]*/
  1311. /** @stable ICU 4.4 */
  1312. UBLOCK_MEETEI_MAYEK = 184, /*[ABC0]*/
  1313. /** @stable ICU 4.4 */
  1314. UBLOCK_HANGUL_JAMO_EXTENDED_B = 185, /*[D7B0]*/
  1315. /** @stable ICU 4.4 */
  1316. UBLOCK_IMPERIAL_ARAMAIC = 186, /*[10840]*/
  1317. /** @stable ICU 4.4 */
  1318. UBLOCK_OLD_SOUTH_ARABIAN = 187, /*[10A60]*/
  1319. /** @stable ICU 4.4 */
  1320. UBLOCK_AVESTAN = 188, /*[10B00]*/
  1321. /** @stable ICU 4.4 */
  1322. UBLOCK_INSCRIPTIONAL_PARTHIAN = 189, /*[10B40]*/
  1323. /** @stable ICU 4.4 */
  1324. UBLOCK_INSCRIPTIONAL_PAHLAVI = 190, /*[10B60]*/
  1325. /** @stable ICU 4.4 */
  1326. UBLOCK_OLD_TURKIC = 191, /*[10C00]*/
  1327. /** @stable ICU 4.4 */
  1328. UBLOCK_RUMI_NUMERAL_SYMBOLS = 192, /*[10E60]*/
  1329. /** @stable ICU 4.4 */
  1330. UBLOCK_KAITHI = 193, /*[11080]*/
  1331. /** @stable ICU 4.4 */
  1332. UBLOCK_EGYPTIAN_HIEROGLYPHS = 194, /*[13000]*/
  1333. /** @stable ICU 4.4 */
  1334. UBLOCK_ENCLOSED_ALPHANUMERIC_SUPPLEMENT = 195, /*[1F100]*/
  1335. /** @stable ICU 4.4 */
  1336. UBLOCK_ENCLOSED_IDEOGRAPHIC_SUPPLEMENT = 196, /*[1F200]*/
  1337. /** @stable ICU 4.4 */
  1338. UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C = 197, /*[2A700]*/
  1339. /* New blocks in Unicode 6.0 */
  1340. /** @stable ICU 4.6 */
  1341. UBLOCK_MANDAIC = 198, /*[0840]*/
  1342. /** @stable ICU 4.6 */
  1343. UBLOCK_BATAK = 199, /*[1BC0]*/
  1344. /** @stable ICU 4.6 */
  1345. UBLOCK_ETHIOPIC_EXTENDED_A = 200, /*[AB00]*/
  1346. /** @stable ICU 4.6 */
  1347. UBLOCK_BRAHMI = 201, /*[11000]*/
  1348. /** @stable ICU 4.6 */
  1349. UBLOCK_BAMUM_SUPPLEMENT = 202, /*[16800]*/
  1350. /** @stable ICU 4.6 */
  1351. UBLOCK_KANA_SUPPLEMENT = 203, /*[1B000]*/
  1352. /** @stable ICU 4.6 */
  1353. UBLOCK_PLAYING_CARDS = 204, /*[1F0A0]*/
  1354. /** @stable ICU 4.6 */
  1355. UBLOCK_MISCELLANEOUS_SYMBOLS_AND_PICTOGRAPHS = 205, /*[1F300]*/
  1356. /** @stable ICU 4.6 */
  1357. UBLOCK_EMOTICONS = 206, /*[1F600]*/
  1358. /** @stable ICU 4.6 */
  1359. UBLOCK_TRANSPORT_AND_MAP_SYMBOLS = 207, /*[1F680]*/
  1360. /** @stable ICU 4.6 */
  1361. UBLOCK_ALCHEMICAL_SYMBOLS = 208, /*[1F700]*/
  1362. /** @stable ICU 4.6 */
  1363. UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D = 209, /*[2B740]*/
  1364. /* New blocks in Unicode 6.1 */
  1365. /** @stable ICU 49 */
  1366. UBLOCK_ARABIC_EXTENDED_A = 210, /*[08A0]*/
  1367. /** @stable ICU 49 */
  1368. UBLOCK_ARABIC_MATHEMATICAL_ALPHABETIC_SYMBOLS = 211, /*[1EE00]*/
  1369. /** @stable ICU 49 */
  1370. UBLOCK_CHAKMA = 212, /*[11100]*/
  1371. /** @stable ICU 49 */
  1372. UBLOCK_MEETEI_MAYEK_EXTENSIONS = 213, /*[AAE0]*/
  1373. /** @stable ICU 49 */
  1374. UBLOCK_MEROITIC_CURSIVE = 214, /*[109A0]*/
  1375. /** @stable ICU 49 */
  1376. UBLOCK_MEROITIC_HIEROGLYPHS = 215, /*[10980]*/
  1377. /** @stable ICU 49 */
  1378. UBLOCK_MIAO = 216, /*[16F00]*/
  1379. /** @stable ICU 49 */
  1380. UBLOCK_SHARADA = 217, /*[11180]*/
  1381. /** @stable ICU 49 */
  1382. UBLOCK_SORA_SOMPENG = 218, /*[110D0]*/
  1383. /** @stable ICU 49 */
  1384. UBLOCK_SUNDANESE_SUPPLEMENT = 219, /*[1CC0]*/
  1385. /** @stable ICU 49 */
  1386. UBLOCK_TAKRI = 220, /*[11680]*/
  1387. /* New blocks in Unicode 7.0 */
  1388. /** @stable ICU 54 */
  1389. UBLOCK_BASSA_VAH = 221, /*[16AD0]*/
  1390. /** @stable ICU 54 */
  1391. UBLOCK_CAUCASIAN_ALBANIAN = 222, /*[10530]*/
  1392. /** @stable ICU 54 */
  1393. UBLOCK_COPTIC_EPACT_NUMBERS = 223, /*[102E0]*/
  1394. /** @stable ICU 54 */
  1395. UBLOCK_COMBINING_DIACRITICAL_MARKS_EXTENDED = 224, /*[1AB0]*/
  1396. /** @stable ICU 54 */
  1397. UBLOCK_DUPLOYAN = 225, /*[1BC00]*/
  1398. /** @stable ICU 54 */
  1399. UBLOCK_ELBASAN = 226, /*[10500]*/
  1400. /** @stable ICU 54 */
  1401. UBLOCK_GEOMETRIC_SHAPES_EXTENDED = 227, /*[1F780]*/
  1402. /** @stable ICU 54 */
  1403. UBLOCK_GRANTHA = 228, /*[11300]*/
  1404. /** @stable ICU 54 */
  1405. UBLOCK_KHOJKI = 229, /*[11200]*/
  1406. /** @stable ICU 54 */
  1407. UBLOCK_KHUDAWADI = 230, /*[112B0]*/
  1408. /** @stable ICU 54 */
  1409. UBLOCK_LATIN_EXTENDED_E = 231, /*[AB30]*/
  1410. /** @stable ICU 54 */
  1411. UBLOCK_LINEAR_A = 232, /*[10600]*/
  1412. /** @stable ICU 54 */
  1413. UBLOCK_MAHAJANI = 233, /*[11150]*/
  1414. /** @stable ICU 54 */
  1415. UBLOCK_MANICHAEAN = 234, /*[10AC0]*/
  1416. /** @stable ICU 54 */
  1417. UBLOCK_MENDE_KIKAKUI = 235, /*[1E800]*/
  1418. /** @stable ICU 54 */
  1419. UBLOCK_MODI = 236, /*[11600]*/
  1420. /** @stable ICU 54 */
  1421. UBLOCK_MRO = 237, /*[16A40]*/
  1422. /** @stable ICU 54 */
  1423. UBLOCK_MYANMAR_EXTENDED_B = 238, /*[A9E0]*/
  1424. /** @stable ICU 54 */
  1425. UBLOCK_NABATAEAN = 239, /*[10880]*/
  1426. /** @stable ICU 54 */
  1427. UBLOCK_OLD_NORTH_ARABIAN = 240, /*[10A80]*/
  1428. /** @stable ICU 54 */
  1429. UBLOCK_OLD_PERMIC = 241, /*[10350]*/
  1430. /** @stable ICU 54 */
  1431. UBLOCK_ORNAMENTAL_DINGBATS = 242, /*[1F650]*/
  1432. /** @stable ICU 54 */
  1433. UBLOCK_PAHAWH_HMONG = 243, /*[16B00]*/
  1434. /** @stable ICU 54 */
  1435. UBLOCK_PALMYRENE = 244, /*[10860]*/
  1436. /** @stable ICU 54 */
  1437. UBLOCK_PAU_CIN_HAU = 245, /*[11AC0]*/
  1438. /** @stable ICU 54 */
  1439. UBLOCK_PSALTER_PAHLAVI = 246, /*[10B80]*/
  1440. /** @stable ICU 54 */
  1441. UBLOCK_SHORTHAND_FORMAT_CONTROLS = 247, /*[1BCA0]*/
  1442. /** @stable ICU 54 */
  1443. UBLOCK_SIDDHAM = 248, /*[11580]*/
  1444. /** @stable ICU 54 */
  1445. UBLOCK_SINHALA_ARCHAIC_NUMBERS = 249, /*[111E0]*/
  1446. /** @stable ICU 54 */
  1447. UBLOCK_SUPPLEMENTAL_ARROWS_C = 250, /*[1F800]*/
  1448. /** @stable ICU 54 */
  1449. UBLOCK_TIRHUTA = 251, /*[11480]*/
  1450. /** @stable ICU 54 */
  1451. UBLOCK_WARANG_CITI = 252, /*[118A0]*/
  1452. /* New blocks in Unicode 8.0 */
  1453. /** @stable ICU 56 */
  1454. UBLOCK_AHOM = 253, /*[11700]*/
  1455. /** @stable ICU 56 */
  1456. UBLOCK_ANATOLIAN_HIEROGLYPHS = 254, /*[14400]*/
  1457. /** @stable ICU 56 */
  1458. UBLOCK_CHEROKEE_SUPPLEMENT = 255, /*[AB70]*/
  1459. /** @stable ICU 56 */
  1460. UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_E = 256, /*[2B820]*/
  1461. /** @stable ICU 56 */
  1462. UBLOCK_EARLY_DYNASTIC_CUNEIFORM = 257, /*[12480]*/
  1463. /** @stable ICU 56 */
  1464. UBLOCK_HATRAN = 258, /*[108E0]*/
  1465. /** @stable ICU 56 */
  1466. UBLOCK_MULTANI = 259, /*[11280]*/
  1467. /** @stable ICU 56 */
  1468. UBLOCK_OLD_HUNGARIAN = 260, /*[10C80]*/
  1469. /** @stable ICU 56 */
  1470. UBLOCK_SUPPLEMENTAL_SYMBOLS_AND_PICTOGRAPHS = 261, /*[1F900]*/
  1471. /** @stable ICU 56 */
  1472. UBLOCK_SUTTON_SIGNWRITING = 262, /*[1D800]*/
  1473. /* New blocks in Unicode 9.0 */
  1474. /** @stable ICU 58 */
  1475. UBLOCK_ADLAM = 263, /*[1E900]*/
  1476. /** @stable ICU 58 */
  1477. UBLOCK_BHAIKSUKI = 264, /*[11C00]*/
  1478. /** @stable ICU 58 */
  1479. UBLOCK_CYRILLIC_EXTENDED_C = 265, /*[1C80]*/
  1480. /** @stable ICU 58 */
  1481. UBLOCK_GLAGOLITIC_SUPPLEMENT = 266, /*[1E000]*/
  1482. /** @stable ICU 58 */
  1483. UBLOCK_IDEOGRAPHIC_SYMBOLS_AND_PUNCTUATION = 267, /*[16FE0]*/
  1484. /** @stable ICU 58 */
  1485. UBLOCK_MARCHEN = 268, /*[11C70]*/
  1486. /** @stable ICU 58 */
  1487. UBLOCK_MONGOLIAN_SUPPLEMENT = 269, /*[11660]*/
  1488. /** @stable ICU 58 */
  1489. UBLOCK_NEWA = 270, /*[11400]*/
  1490. /** @stable ICU 58 */
  1491. UBLOCK_OSAGE = 271, /*[104B0]*/
  1492. /** @stable ICU 58 */
  1493. UBLOCK_TANGUT = 272, /*[17000]*/
  1494. /** @stable ICU 58 */
  1495. UBLOCK_TANGUT_COMPONENTS = 273, /*[18800]*/
  1496. #ifndef U_HIDE_DEPRECATED_API
  1497. /**
  1498. * One more than the highest normal UBlockCode value.
  1499. * The highest value is available via u_getIntPropertyMaxValue(UCHAR_BLOCK).
  1500. *
  1501. * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
  1502. */
  1503. UBLOCK_COUNT = 274,
  1504. #endif // U_HIDE_DEPRECATED_API
  1505. /** @stable ICU 2.0 */
  1506. UBLOCK_INVALID_CODE=-1
  1507. };
  1508. /** @stable ICU 2.0 */
  1509. typedef enum UBlockCode UBlockCode;
  1510. /**
  1511. * East Asian Width constants.
  1512. *
  1513. * @see UCHAR_EAST_ASIAN_WIDTH
  1514. * @see u_getIntPropertyValue
  1515. * @stable ICU 2.2
  1516. */
  1517. typedef enum UEastAsianWidth {
  1518. /*
  1519. * Note: UEastAsianWidth constants are parsed by preparseucd.py.
  1520. * It matches lines like
  1521. * U_EA_<Unicode East_Asian_Width value name>
  1522. */
  1523. U_EA_NEUTRAL, /*[N]*/
  1524. U_EA_AMBIGUOUS, /*[A]*/
  1525. U_EA_HALFWIDTH, /*[H]*/
  1526. U_EA_FULLWIDTH, /*[F]*/
  1527. U_EA_NARROW, /*[Na]*/
  1528. U_EA_WIDE, /*[W]*/
  1529. #ifndef U_HIDE_DEPRECATED_API
  1530. /**
  1531. * One more than the highest normal UEastAsianWidth value.
  1532. * The highest value is available via u_getIntPropertyMaxValue(UCHAR_EAST_ASIAN_WIDTH).
  1533. *
  1534. * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
  1535. */
  1536. U_EA_COUNT
  1537. #endif // U_HIDE_DEPRECATED_API
  1538. } UEastAsianWidth;
  1539. /**
  1540. * Selector constants for u_charName().
  1541. * u_charName() returns the "modern" name of a
  1542. * Unicode character; or the name that was defined in
  1543. * Unicode version 1.0, before the Unicode standard merged
  1544. * with ISO-10646; or an "extended" name that gives each
  1545. * Unicode code point a unique name.
  1546. *
  1547. * @see u_charName
  1548. * @stable ICU 2.0
  1549. */
  1550. typedef enum UCharNameChoice {
  1551. /** Unicode character name (Name property). @stable ICU 2.0 */
  1552. U_UNICODE_CHAR_NAME,
  1553. #ifndef U_HIDE_DEPRECATED_API
  1554. /**
  1555. * The Unicode_1_Name property value which is of little practical value.
  1556. * Beginning with ICU 49, ICU APIs return an empty string for this name choice.
  1557. * @deprecated ICU 49
  1558. */
  1559. U_UNICODE_10_CHAR_NAME,
  1560. #endif /* U_HIDE_DEPRECATED_API */
  1561. /** Standard or synthetic character name. @stable ICU 2.0 */
  1562. U_EXTENDED_CHAR_NAME = U_UNICODE_CHAR_NAME+2,
  1563. /** Corrected name from NameAliases.txt. @stable ICU 4.4 */
  1564. U_CHAR_NAME_ALIAS,
  1565. #ifndef U_HIDE_DEPRECATED_API
  1566. /**
  1567. * One more than the highest normal UCharNameChoice value.
  1568. * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
  1569. */
  1570. U_CHAR_NAME_CHOICE_COUNT
  1571. #endif // U_HIDE_DEPRECATED_API
  1572. } UCharNameChoice;
  1573. /**
  1574. * Selector constants for u_getPropertyName() and
  1575. * u_getPropertyValueName(). These selectors are used to choose which
  1576. * name is returned for a given property or value. All properties and
  1577. * values have a long name. Most have a short name, but some do not.
  1578. * Unicode allows for additional names, beyond the long and short
  1579. * name, which would be indicated by U_LONG_PROPERTY_NAME + i, where
  1580. * i=1, 2,...
  1581. *
  1582. * @see u_getPropertyName()
  1583. * @see u_getPropertyValueName()
  1584. * @stable ICU 2.4
  1585. */
  1586. typedef enum UPropertyNameChoice {
  1587. U_SHORT_PROPERTY_NAME,
  1588. U_LONG_PROPERTY_NAME,
  1589. #ifndef U_HIDE_DEPRECATED_API
  1590. /**
  1591. * One more than the highest normal UPropertyNameChoice value.
  1592. * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
  1593. */
  1594. U_PROPERTY_NAME_CHOICE_COUNT
  1595. #endif // U_HIDE_DEPRECATED_API
  1596. } UPropertyNameChoice;
  1597. /**
  1598. * Decomposition Type constants.
  1599. *
  1600. * @see UCHAR_DECOMPOSITION_TYPE
  1601. * @stable ICU 2.2
  1602. */
  1603. typedef enum UDecompositionType {
  1604. /*
  1605. * Note: UDecompositionType constants are parsed by preparseucd.py.
  1606. * It matches lines like
  1607. * U_DT_<Unicode Decomposition_Type value name>
  1608. */
  1609. U_DT_NONE, /*[none]*/
  1610. U_DT_CANONICAL, /*[can]*/
  1611. U_DT_COMPAT, /*[com]*/
  1612. U_DT_CIRCLE, /*[enc]*/
  1613. U_DT_FINAL, /*[fin]*/
  1614. U_DT_FONT, /*[font]*/
  1615. U_DT_FRACTION, /*[fra]*/
  1616. U_DT_INITIAL, /*[init]*/
  1617. U_DT_ISOLATED, /*[iso]*/
  1618. U_DT_MEDIAL, /*[med]*/
  1619. U_DT_NARROW, /*[nar]*/
  1620. U_DT_NOBREAK, /*[nb]*/
  1621. U_DT_SMALL, /*[sml]*/
  1622. U_DT_SQUARE, /*[sqr]*/
  1623. U_DT_SUB, /*[sub]*/
  1624. U_DT_SUPER, /*[sup]*/
  1625. U_DT_VERTICAL, /*[vert]*/
  1626. U_DT_WIDE, /*[wide]*/
  1627. #ifndef U_HIDE_DEPRECATED_API
  1628. /**
  1629. * One more than the highest normal UDecompositionType value.
  1630. * The highest value is available via u_getIntPropertyMaxValue(UCHAR_DECOMPOSITION_TYPE).
  1631. *
  1632. * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
  1633. */
  1634. U_DT_COUNT /* 18 */
  1635. #endif // U_HIDE_DEPRECATED_API
  1636. } UDecompositionType;
  1637. /**
  1638. * Joining Type constants.
  1639. *
  1640. * @see UCHAR_JOINING_TYPE
  1641. * @stable ICU 2.2
  1642. */
  1643. typedef enum UJoiningType {
  1644. /*
  1645. * Note: UJoiningType constants are parsed by preparseucd.py.
  1646. * It matches lines like
  1647. * U_JT_<Unicode Joining_Type value name>
  1648. */
  1649. U_JT_NON_JOINING, /*[U]*/
  1650. U_JT_JOIN_CAUSING, /*[C]*/
  1651. U_JT_DUAL_JOINING, /*[D]*/
  1652. U_JT_LEFT_JOINING, /*[L]*/
  1653. U_JT_RIGHT_JOINING, /*[R]*/
  1654. U_JT_TRANSPARENT, /*[T]*/
  1655. #ifndef U_HIDE_DEPRECATED_API
  1656. /**
  1657. * One more than the highest normal UJoiningType value.
  1658. * The highest value is available via u_getIntPropertyMaxValue(UCHAR_JOINING_TYPE).
  1659. *
  1660. * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
  1661. */
  1662. U_JT_COUNT /* 6 */
  1663. #endif // U_HIDE_DEPRECATED_API
  1664. } UJoiningType;
  1665. /**
  1666. * Joining Group constants.
  1667. *
  1668. * @see UCHAR_JOINING_GROUP
  1669. * @stable ICU 2.2
  1670. */
  1671. typedef enum UJoiningGroup {
  1672. /*
  1673. * Note: UJoiningGroup constants are parsed by preparseucd.py.
  1674. * It matches lines like
  1675. * U_JG_<Unicode Joining_Group value name>
  1676. */
  1677. U_JG_NO_JOINING_GROUP,
  1678. U_JG_AIN,
  1679. U_JG_ALAPH,
  1680. U_JG_ALEF,
  1681. U_JG_BEH,
  1682. U_JG_BETH,
  1683. U_JG_DAL,
  1684. U_JG_DALATH_RISH,
  1685. U_JG_E,
  1686. U_JG_FEH,
  1687. U_JG_FINAL_SEMKATH,
  1688. U_JG_GAF,
  1689. U_JG_GAMAL,
  1690. U_JG_HAH,
  1691. U_JG_TEH_MARBUTA_GOAL, /**< @stable ICU 4.6 */
  1692. U_JG_HAMZA_ON_HEH_GOAL=U_JG_TEH_MARBUTA_GOAL,
  1693. U_JG_HE,
  1694. U_JG_HEH,
  1695. U_JG_HEH_GOAL,
  1696. U_JG_HETH,
  1697. U_JG_KAF,
  1698. U_JG_KAPH,
  1699. U_JG_KNOTTED_HEH,
  1700. U_JG_LAM,
  1701. U_JG_LAMADH,
  1702. U_JG_MEEM,
  1703. U_JG_MIM,
  1704. U_JG_NOON,
  1705. U_JG_NUN,
  1706. U_JG_PE,
  1707. U_JG_QAF,
  1708. U_JG_QAPH,
  1709. U_JG_REH,
  1710. U_JG_REVERSED_PE,
  1711. U_JG_SAD,
  1712. U_JG_SADHE,
  1713. U_JG_SEEN,
  1714. U_JG_SEMKATH,
  1715. U_JG_SHIN,
  1716. U_JG_SWASH_KAF,
  1717. U_JG_SYRIAC_WAW,
  1718. U_JG_TAH,
  1719. U_JG_TAW,
  1720. U_JG_TEH_MARBUTA,
  1721. U_JG_TETH,
  1722. U_JG_WAW,
  1723. U_JG_YEH,
  1724. U_JG_YEH_BARREE,
  1725. U_JG_YEH_WITH_TAIL,
  1726. U_JG_YUDH,
  1727. U_JG_YUDH_HE,
  1728. U_JG_ZAIN,
  1729. U_JG_FE, /**< @stable ICU 2.6 */
  1730. U_JG_KHAPH, /**< @stable ICU 2.6 */
  1731. U_JG_ZHAIN, /**< @stable ICU 2.6 */
  1732. U_JG_BURUSHASKI_YEH_BARREE, /**< @stable ICU 4.0 */
  1733. U_JG_FARSI_YEH, /**< @stable ICU 4.4 */
  1734. U_JG_NYA, /**< @stable ICU 4.4 */
  1735. U_JG_ROHINGYA_YEH, /**< @stable ICU 49 */
  1736. U_JG_MANICHAEAN_ALEPH, /**< @stable ICU 54 */
  1737. U_JG_MANICHAEAN_AYIN, /**< @stable ICU 54 */
  1738. U_JG_MANICHAEAN_BETH, /**< @stable ICU 54 */
  1739. U_JG_MANICHAEAN_DALETH, /**< @stable ICU 54 */
  1740. U_JG_MANICHAEAN_DHAMEDH, /**< @stable ICU 54 */
  1741. U_JG_MANICHAEAN_FIVE, /**< @stable ICU 54 */
  1742. U_JG_MANICHAEAN_GIMEL, /**< @stable ICU 54 */
  1743. U_JG_MANICHAEAN_HETH, /**< @stable ICU 54 */
  1744. U_JG_MANICHAEAN_HUNDRED, /**< @stable ICU 54 */
  1745. U_JG_MANICHAEAN_KAPH, /**< @stable ICU 54 */
  1746. U_JG_MANICHAEAN_LAMEDH, /**< @stable ICU 54 */
  1747. U_JG_MANICHAEAN_MEM, /**< @stable ICU 54 */
  1748. U_JG_MANICHAEAN_NUN, /**< @stable ICU 54 */
  1749. U_JG_MANICHAEAN_ONE, /**< @stable ICU 54 */
  1750. U_JG_MANICHAEAN_PE, /**< @stable ICU 54 */
  1751. U_JG_MANICHAEAN_QOPH, /**< @stable ICU 54 */
  1752. U_JG_MANICHAEAN_RESH, /**< @stable ICU 54 */
  1753. U_JG_MANICHAEAN_SADHE, /**< @stable ICU 54 */
  1754. U_JG_MANICHAEAN_SAMEKH, /**< @stable ICU 54 */
  1755. U_JG_MANICHAEAN_TAW, /**< @stable ICU 54 */
  1756. U_JG_MANICHAEAN_TEN, /**< @stable ICU 54 */
  1757. U_JG_MANICHAEAN_TETH, /**< @stable ICU 54 */
  1758. U_JG_MANICHAEAN_THAMEDH, /**< @stable ICU 54 */
  1759. U_JG_MANICHAEAN_TWENTY, /**< @stable ICU 54 */
  1760. U_JG_MANICHAEAN_WAW, /**< @stable ICU 54 */
  1761. U_JG_MANICHAEAN_YODH, /**< @stable ICU 54 */
  1762. U_JG_MANICHAEAN_ZAYIN, /**< @stable ICU 54 */
  1763. U_JG_STRAIGHT_WAW, /**< @stable ICU 54 */
  1764. U_JG_AFRICAN_FEH, /**< @stable ICU 58 */
  1765. U_JG_AFRICAN_NOON, /**< @stable ICU 58 */
  1766. U_JG_AFRICAN_QAF, /**< @stable ICU 58 */
  1767. #ifndef U_HIDE_DEPRECATED_API
  1768. /**
  1769. * One more than the highest normal UJoiningGroup value.
  1770. * The highest value is available via u_getIntPropertyMaxValue(UCHAR_JOINING_GROUP).
  1771. *
  1772. * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
  1773. */
  1774. U_JG_COUNT
  1775. #endif // U_HIDE_DEPRECATED_API
  1776. } UJoiningGroup;
  1777. /**
  1778. * Grapheme Cluster Break constants.
  1779. *
  1780. * @see UCHAR_GRAPHEME_CLUSTER_BREAK
  1781. * @stable ICU 3.4
  1782. */
  1783. typedef enum UGraphemeClusterBreak {
  1784. /*
  1785. * Note: UGraphemeClusterBreak constants are parsed by preparseucd.py.
  1786. * It matches lines like
  1787. * U_GCB_<Unicode Grapheme_Cluster_Break value name>
  1788. */
  1789. U_GCB_OTHER = 0, /*[XX]*/
  1790. U_GCB_CONTROL = 1, /*[CN]*/
  1791. U_GCB_CR = 2, /*[CR]*/
  1792. U_GCB_EXTEND = 3, /*[EX]*/
  1793. U_GCB_L = 4, /*[L]*/
  1794. U_GCB_LF = 5, /*[LF]*/
  1795. U_GCB_LV = 6, /*[LV]*/
  1796. U_GCB_LVT = 7, /*[LVT]*/
  1797. U_GCB_T = 8, /*[T]*/
  1798. U_GCB_V = 9, /*[V]*/
  1799. /** @stable ICU 4.0 */
  1800. U_GCB_SPACING_MARK = 10, /*[SM]*/ /* from here on: new in Unicode 5.1/ICU 4.0 */
  1801. /** @stable ICU 4.0 */
  1802. U_GCB_PREPEND = 11, /*[PP]*/
  1803. /** @stable ICU 50 */
  1804. U_GCB_REGIONAL_INDICATOR = 12, /*[RI]*/ /* new in Unicode 6.2/ICU 50 */
  1805. /** @stable ICU 58 */
  1806. U_GCB_E_BASE = 13, /*[EB]*/ /* from here on: new in Unicode 9.0/ICU 58 */
  1807. /** @stable ICU 58 */
  1808. U_GCB_E_BASE_GAZ = 14, /*[EBG]*/
  1809. /** @stable ICU 58 */
  1810. U_GCB_E_MODIFIER = 15, /*[EM]*/
  1811. /** @stable ICU 58 */
  1812. U_GCB_GLUE_AFTER_ZWJ = 16, /*[GAZ]*/
  1813. /** @stable ICU 58 */
  1814. U_GCB_ZWJ = 17, /*[ZWJ]*/
  1815. #ifndef U_HIDE_DEPRECATED_API
  1816. /**
  1817. * One more than the highest normal UGraphemeClusterBreak value.
  1818. * The highest value is available via u_getIntPropertyMaxValue(UCHAR_GRAPHEME_CLUSTER_BREAK).
  1819. *
  1820. * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
  1821. */
  1822. U_GCB_COUNT = 18
  1823. #endif // U_HIDE_DEPRECATED_API
  1824. } UGraphemeClusterBreak;
  1825. /**
  1826. * Word Break constants.
  1827. * (UWordBreak is a pre-existing enum type in ubrk.h for word break status tags.)
  1828. *
  1829. * @see UCHAR_WORD_BREAK
  1830. * @stable ICU 3.4
  1831. */
  1832. typedef enum UWordBreakValues {
  1833. /*
  1834. * Note: UWordBreakValues constants are parsed by preparseucd.py.
  1835. * It matches lines like
  1836. * U_WB_<Unicode Word_Break value name>
  1837. */
  1838. U_WB_OTHER = 0, /*[XX]*/
  1839. U_WB_ALETTER = 1, /*[LE]*/
  1840. U_WB_FORMAT = 2, /*[FO]*/
  1841. U_WB_KATAKANA = 3, /*[KA]*/
  1842. U_WB_MIDLETTER = 4, /*[ML]*/
  1843. U_WB_MIDNUM = 5, /*[MN]*/
  1844. U_WB_NUMERIC = 6, /*[NU]*/
  1845. U_WB_EXTENDNUMLET = 7, /*[EX]*/
  1846. /** @stable ICU 4.0 */
  1847. U_WB_CR = 8, /*[CR]*/ /* from here on: new in Unicode 5.1/ICU 4.0 */
  1848. /** @stable ICU 4.0 */
  1849. U_WB_EXTEND = 9, /*[Extend]*/
  1850. /** @stable ICU 4.0 */
  1851. U_WB_LF = 10, /*[LF]*/
  1852. /** @stable ICU 4.0 */
  1853. U_WB_MIDNUMLET =11, /*[MB]*/
  1854. /** @stable ICU 4.0 */
  1855. U_WB_NEWLINE =12, /*[NL]*/
  1856. /** @stable ICU 50 */
  1857. U_WB_REGIONAL_INDICATOR = 13, /*[RI]*/ /* new in Unicode 6.2/ICU 50 */
  1858. /** @stable ICU 52 */
  1859. U_WB_HEBREW_LETTER = 14, /*[HL]*/ /* from here on: new in Unicode 6.3/ICU 52 */
  1860. /** @stable ICU 52 */
  1861. U_WB_SINGLE_QUOTE = 15, /*[SQ]*/
  1862. /** @stable ICU 52 */
  1863. U_WB_DOUBLE_QUOTE = 16, /*[DQ]*/
  1864. /** @stable ICU 58 */
  1865. U_WB_E_BASE = 17, /*[EB]*/ /* from here on: new in Unicode 9.0/ICU 58 */
  1866. /** @stable ICU 58 */
  1867. U_WB_E_BASE_GAZ = 18, /*[EBG]*/
  1868. /** @stable ICU 58 */
  1869. U_WB_E_MODIFIER = 19, /*[EM]*/
  1870. /** @stable ICU 58 */
  1871. U_WB_GLUE_AFTER_ZWJ = 20, /*[GAZ]*/
  1872. /** @stable ICU 58 */
  1873. U_WB_ZWJ = 21, /*[ZWJ]*/
  1874. #ifndef U_HIDE_DEPRECATED_API
  1875. /**
  1876. * One more than the highest normal UWordBreakValues value.
  1877. * The highest value is available via u_getIntPropertyMaxValue(UCHAR_WORD_BREAK).
  1878. *
  1879. * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
  1880. */
  1881. U_WB_COUNT = 22
  1882. #endif // U_HIDE_DEPRECATED_API
  1883. } UWordBreakValues;
  1884. /**
  1885. * Sentence Break constants.
  1886. *
  1887. * @see UCHAR_SENTENCE_BREAK
  1888. * @stable ICU 3.4
  1889. */
  1890. typedef enum USentenceBreak {
  1891. /*
  1892. * Note: USentenceBreak constants are parsed by preparseucd.py.
  1893. * It matches lines like
  1894. * U_SB_<Unicode Sentence_Break value name>
  1895. */
  1896. U_SB_OTHER = 0, /*[XX]*/
  1897. U_SB_ATERM = 1, /*[AT]*/
  1898. U_SB_CLOSE = 2, /*[CL]*/
  1899. U_SB_FORMAT = 3, /*[FO]*/
  1900. U_SB_LOWER = 4, /*[LO]*/
  1901. U_SB_NUMERIC = 5, /*[NU]*/
  1902. U_SB_OLETTER = 6, /*[LE]*/
  1903. U_SB_SEP = 7, /*[SE]*/
  1904. U_SB_SP = 8, /*[SP]*/
  1905. U_SB_STERM = 9, /*[ST]*/
  1906. U_SB_UPPER = 10, /*[UP]*/
  1907. U_SB_CR = 11, /*[CR]*/ /* from here on: new in Unicode 5.1/ICU 4.0 */
  1908. U_SB_EXTEND = 12, /*[EX]*/
  1909. U_SB_LF = 13, /*[LF]*/
  1910. U_SB_SCONTINUE = 14, /*[SC]*/
  1911. #ifndef U_HIDE_DEPRECATED_API
  1912. /**
  1913. * One more than the highest normal USentenceBreak value.
  1914. * The highest value is available via u_getIntPropertyMaxValue(UCHAR_SENTENCE_BREAK).
  1915. *
  1916. * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
  1917. */
  1918. U_SB_COUNT = 15
  1919. #endif // U_HIDE_DEPRECATED_API
  1920. } USentenceBreak;
  1921. /**
  1922. * Line Break constants.
  1923. *
  1924. * @see UCHAR_LINE_BREAK
  1925. * @stable ICU 2.2
  1926. */
  1927. typedef enum ULineBreak {
  1928. /*
  1929. * Note: ULineBreak constants are parsed by preparseucd.py.
  1930. * It matches lines like
  1931. * U_LB_<Unicode Line_Break value name>
  1932. */
  1933. U_LB_UNKNOWN = 0, /*[XX]*/
  1934. U_LB_AMBIGUOUS = 1, /*[AI]*/
  1935. U_LB_ALPHABETIC = 2, /*[AL]*/
  1936. U_LB_BREAK_BOTH = 3, /*[B2]*/
  1937. U_LB_BREAK_AFTER = 4, /*[BA]*/
  1938. U_LB_BREAK_BEFORE = 5, /*[BB]*/
  1939. U_LB_MANDATORY_BREAK = 6, /*[BK]*/
  1940. U_LB_CONTINGENT_BREAK = 7, /*[CB]*/
  1941. U_LB_CLOSE_PUNCTUATION = 8, /*[CL]*/
  1942. U_LB_COMBINING_MARK = 9, /*[CM]*/
  1943. U_LB_CARRIAGE_RETURN = 10, /*[CR]*/
  1944. U_LB_EXCLAMATION = 11, /*[EX]*/
  1945. U_LB_GLUE = 12, /*[GL]*/
  1946. U_LB_HYPHEN = 13, /*[HY]*/
  1947. U_LB_IDEOGRAPHIC = 14, /*[ID]*/
  1948. /** Renamed from the misspelled "inseperable" in Unicode 4.0.1/ICU 3.0 @stable ICU 3.0 */
  1949. U_LB_INSEPARABLE = 15, /*[IN]*/
  1950. U_LB_INSEPERABLE = U_LB_INSEPARABLE,
  1951. U_LB_INFIX_NUMERIC = 16, /*[IS]*/
  1952. U_LB_LINE_FEED = 17, /*[LF]*/
  1953. U_LB_NONSTARTER = 18, /*[NS]*/
  1954. U_LB_NUMERIC = 19, /*[NU]*/
  1955. U_LB_OPEN_PUNCTUATION = 20, /*[OP]*/
  1956. U_LB_POSTFIX_NUMERIC = 21, /*[PO]*/
  1957. U_LB_PREFIX_NUMERIC = 22, /*[PR]*/
  1958. U_LB_QUOTATION = 23, /*[QU]*/
  1959. U_LB_COMPLEX_CONTEXT = 24, /*[SA]*/
  1960. U_LB_SURROGATE = 25, /*[SG]*/
  1961. U_LB_SPACE = 26, /*[SP]*/
  1962. U_LB_BREAK_SYMBOLS = 27, /*[SY]*/
  1963. U_LB_ZWSPACE = 28, /*[ZW]*/
  1964. /** @stable ICU 2.6 */
  1965. U_LB_NEXT_LINE = 29, /*[NL]*/ /* from here on: new in Unicode 4/ICU 2.6 */
  1966. /** @stable ICU 2.6 */
  1967. U_LB_WORD_JOINER = 30, /*[WJ]*/
  1968. /** @stable ICU 3.4 */
  1969. U_LB_H2 = 31, /*[H2]*/ /* from here on: new in Unicode 4.1/ICU 3.4 */
  1970. /** @stable ICU 3.4 */
  1971. U_LB_H3 = 32, /*[H3]*/
  1972. /** @stable ICU 3.4 */
  1973. U_LB_JL = 33, /*[JL]*/
  1974. /** @stable ICU 3.4 */
  1975. U_LB_JT = 34, /*[JT]*/
  1976. /** @stable ICU 3.4 */
  1977. U_LB_JV = 35, /*[JV]*/
  1978. /** @stable ICU 4.4 */
  1979. U_LB_CLOSE_PARENTHESIS = 36, /*[CP]*/ /* new in Unicode 5.2/ICU 4.4 */
  1980. /** @stable ICU 49 */
  1981. U_LB_CONDITIONAL_JAPANESE_STARTER = 37,/*[CJ]*/ /* new in Unicode 6.1/ICU 49 */
  1982. /** @stable ICU 49 */
  1983. U_LB_HEBREW_LETTER = 38, /*[HL]*/ /* new in Unicode 6.1/ICU 49 */
  1984. /** @stable ICU 50 */
  1985. U_LB_REGIONAL_INDICATOR = 39,/*[RI]*/ /* new in Unicode 6.2/ICU 50 */
  1986. /** @stable ICU 58 */
  1987. U_LB_E_BASE = 40, /*[EB]*/ /* from here on: new in Unicode 9.0/ICU 58 */
  1988. /** @stable ICU 58 */
  1989. U_LB_E_MODIFIER = 41, /*[EM]*/
  1990. /** @stable ICU 58 */
  1991. U_LB_ZWJ = 42, /*[ZWJ]*/
  1992. #ifndef U_HIDE_DEPRECATED_API
  1993. /**
  1994. * One more than the highest normal ULineBreak value.
  1995. * The highest value is available via u_getIntPropertyMaxValue(UCHAR_LINE_BREAK).
  1996. *
  1997. * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
  1998. */
  1999. U_LB_COUNT = 43
  2000. #endif // U_HIDE_DEPRECATED_API
  2001. } ULineBreak;
  2002. /**
  2003. * Numeric Type constants.
  2004. *
  2005. * @see UCHAR_NUMERIC_TYPE
  2006. * @stable ICU 2.2
  2007. */
  2008. typedef enum UNumericType {
  2009. /*
  2010. * Note: UNumericType constants are parsed by preparseucd.py.
  2011. * It matches lines like
  2012. * U_NT_<Unicode Numeric_Type value name>
  2013. */
  2014. U_NT_NONE, /*[None]*/
  2015. U_NT_DECIMAL, /*[de]*/
  2016. U_NT_DIGIT, /*[di]*/
  2017. U_NT_NUMERIC, /*[nu]*/
  2018. #ifndef U_HIDE_DEPRECATED_API
  2019. /**
  2020. * One more than the highest normal UNumericType value.
  2021. * The highest value is available via u_getIntPropertyMaxValue(UCHAR_NUMERIC_TYPE).
  2022. *
  2023. * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
  2024. */
  2025. U_NT_COUNT
  2026. #endif // U_HIDE_DEPRECATED_API
  2027. } UNumericType;
  2028. /**
  2029. * Hangul Syllable Type constants.
  2030. *
  2031. * @see UCHAR_HANGUL_SYLLABLE_TYPE
  2032. * @stable ICU 2.6
  2033. */
  2034. typedef enum UHangulSyllableType {
  2035. /*
  2036. * Note: UHangulSyllableType constants are parsed by preparseucd.py.
  2037. * It matches lines like
  2038. * U_HST_<Unicode Hangul_Syllable_Type value name>
  2039. */
  2040. U_HST_NOT_APPLICABLE, /*[NA]*/
  2041. U_HST_LEADING_JAMO, /*[L]*/
  2042. U_HST_VOWEL_JAMO, /*[V]*/
  2043. U_HST_TRAILING_JAMO, /*[T]*/
  2044. U_HST_LV_SYLLABLE, /*[LV]*/
  2045. U_HST_LVT_SYLLABLE, /*[LVT]*/
  2046. #ifndef U_HIDE_DEPRECATED_API
  2047. /**
  2048. * One more than the highest normal UHangulSyllableType value.
  2049. * The highest value is available via u_getIntPropertyMaxValue(UCHAR_HANGUL_SYLLABLE_TYPE).
  2050. *
  2051. * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
  2052. */
  2053. U_HST_COUNT
  2054. #endif // U_HIDE_DEPRECATED_API
  2055. } UHangulSyllableType;
  2056. /**
  2057. * Check a binary Unicode property for a code point.
  2058. *
  2059. * Unicode, especially in version 3.2, defines many more properties than the
  2060. * original set in UnicodeData.txt.
  2061. *
  2062. * The properties APIs are intended to reflect Unicode properties as defined
  2063. * in the Unicode Character Database (UCD) and Unicode Technical Reports (UTR).
  2064. * For details about the properties see http://www.unicode.org/ucd/ .
  2065. * For names of Unicode properties see the UCD file PropertyAliases.txt.
  2066. *
  2067. * Important: If ICU is built with UCD files from Unicode versions below 3.2,
  2068. * then properties marked with "new in Unicode 3.2" are not or not fully available.
  2069. *
  2070. * @param c Code point to test.
  2071. * @param which UProperty selector constant, identifies which binary property to check.
  2072. * Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT.
  2073. * @return TRUE or FALSE according to the binary Unicode property value for c.
  2074. * Also FALSE if 'which' is out of bounds or if the Unicode version
  2075. * does not have data for the property at all, or not for this code point.
  2076. *
  2077. * @see UProperty
  2078. * @see u_getIntPropertyValue
  2079. * @see u_getUnicodeVersion
  2080. * @stable ICU 2.1
  2081. */
  2082. U_STABLE UBool U_EXPORT2
  2083. u_hasBinaryProperty(UChar32 c, UProperty which);
  2084. /**
  2085. * Check if a code point has the Alphabetic Unicode property.
  2086. * Same as u_hasBinaryProperty(c, UCHAR_ALPHABETIC).
  2087. * This is different from u_isalpha!
  2088. * @param c Code point to test
  2089. * @return true if the code point has the Alphabetic Unicode property, false otherwise
  2090. *
  2091. * @see UCHAR_ALPHABETIC
  2092. * @see u_isalpha
  2093. * @see u_hasBinaryProperty
  2094. * @stable ICU 2.1
  2095. */
  2096. U_STABLE UBool U_EXPORT2
  2097. u_isUAlphabetic(UChar32 c);
  2098. /**
  2099. * Check if a code point has the Lowercase Unicode property.
  2100. * Same as u_hasBinaryProperty(c, UCHAR_LOWERCASE).
  2101. * This is different from u_islower!
  2102. * @param c Code point to test
  2103. * @return true if the code point has the Lowercase Unicode property, false otherwise
  2104. *
  2105. * @see UCHAR_LOWERCASE
  2106. * @see u_islower
  2107. * @see u_hasBinaryProperty
  2108. * @stable ICU 2.1
  2109. */
  2110. U_STABLE UBool U_EXPORT2
  2111. u_isULowercase(UChar32 c);
  2112. /**
  2113. * Check if a code point has the Uppercase Unicode property.
  2114. * Same as u_hasBinaryProperty(c, UCHAR_UPPERCASE).
  2115. * This is different from u_isupper!
  2116. * @param c Code point to test
  2117. * @return true if the code point has the Uppercase Unicode property, false otherwise
  2118. *
  2119. * @see UCHAR_UPPERCASE
  2120. * @see u_isupper
  2121. * @see u_hasBinaryProperty
  2122. * @stable ICU 2.1
  2123. */
  2124. U_STABLE UBool U_EXPORT2
  2125. u_isUUppercase(UChar32 c);
  2126. /**
  2127. * Check if a code point has the White_Space Unicode property.
  2128. * Same as u_hasBinaryProperty(c, UCHAR_WHITE_SPACE).
  2129. * This is different from both u_isspace and u_isWhitespace!
  2130. *
  2131. * Note: There are several ICU whitespace functions; please see the uchar.h
  2132. * file documentation for a detailed comparison.
  2133. *
  2134. * @param c Code point to test
  2135. * @return true if the code point has the White_Space Unicode property, false otherwise.
  2136. *
  2137. * @see UCHAR_WHITE_SPACE
  2138. * @see u_isWhitespace
  2139. * @see u_isspace
  2140. * @see u_isJavaSpaceChar
  2141. * @see u_hasBinaryProperty
  2142. * @stable ICU 2.1
  2143. */
  2144. U_STABLE UBool U_EXPORT2
  2145. u_isUWhiteSpace(UChar32 c);
  2146. /**
  2147. * Get the property value for an enumerated or integer Unicode property for a code point.
  2148. * Also returns binary and mask property values.
  2149. *
  2150. * Unicode, especially in version 3.2, defines many more properties than the
  2151. * original set in UnicodeData.txt.
  2152. *
  2153. * The properties APIs are intended to reflect Unicode properties as defined
  2154. * in the Unicode Character Database (UCD) and Unicode Technical Reports (UTR).
  2155. * For details about the properties see http://www.unicode.org/ .
  2156. * For names of Unicode properties see the UCD file PropertyAliases.txt.
  2157. *
  2158. * Sample usage:
  2159. * UEastAsianWidth ea=(UEastAsianWidth)u_getIntPropertyValue(c, UCHAR_EAST_ASIAN_WIDTH);
  2160. * UBool b=(UBool)u_getIntPropertyValue(c, UCHAR_IDEOGRAPHIC);
  2161. *
  2162. * @param c Code point to test.
  2163. * @param which UProperty selector constant, identifies which property to check.
  2164. * Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT
  2165. * or UCHAR_INT_START<=which<UCHAR_INT_LIMIT
  2166. * or UCHAR_MASK_START<=which<UCHAR_MASK_LIMIT.
  2167. * @return Numeric value that is directly the property value or,
  2168. * for enumerated properties, corresponds to the numeric value of the enumerated
  2169. * constant of the respective property value enumeration type
  2170. * (cast to enum type if necessary).
  2171. * Returns 0 or 1 (for FALSE/TRUE) for binary Unicode properties.
  2172. * Returns a bit-mask for mask properties.
  2173. * Returns 0 if 'which' is out of bounds or if the Unicode version
  2174. * does not have data for the property at all, or not for this code point.
  2175. *
  2176. * @see UProperty
  2177. * @see u_hasBinaryProperty
  2178. * @see u_getIntPropertyMinValue
  2179. * @see u_getIntPropertyMaxValue
  2180. * @see u_getUnicodeVersion
  2181. * @stable ICU 2.2
  2182. */
  2183. U_STABLE int32_t U_EXPORT2
  2184. u_getIntPropertyValue(UChar32 c, UProperty which);
  2185. /**
  2186. * Get the minimum value for an enumerated/integer/binary Unicode property.
  2187. * Can be used together with u_getIntPropertyMaxValue
  2188. * to allocate arrays of UnicodeSet or similar.
  2189. *
  2190. * @param which UProperty selector constant, identifies which binary property to check.
  2191. * Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT
  2192. * or UCHAR_INT_START<=which<UCHAR_INT_LIMIT.
  2193. * @return Minimum value returned by u_getIntPropertyValue for a Unicode property.
  2194. * 0 if the property selector is out of range.
  2195. *
  2196. * @see UProperty
  2197. * @see u_hasBinaryProperty
  2198. * @see u_getUnicodeVersion
  2199. * @see u_getIntPropertyMaxValue
  2200. * @see u_getIntPropertyValue
  2201. * @stable ICU 2.2
  2202. */
  2203. U_STABLE int32_t U_EXPORT2
  2204. u_getIntPropertyMinValue(UProperty which);
  2205. /**
  2206. * Get the maximum value for an enumerated/integer/binary Unicode property.
  2207. * Can be used together with u_getIntPropertyMinValue
  2208. * to allocate arrays of UnicodeSet or similar.
  2209. *
  2210. * Examples for min/max values (for Unicode 3.2):
  2211. *
  2212. * - UCHAR_BIDI_CLASS: 0/18 (U_LEFT_TO_RIGHT/U_BOUNDARY_NEUTRAL)
  2213. * - UCHAR_SCRIPT: 0/45 (USCRIPT_COMMON/USCRIPT_TAGBANWA)
  2214. * - UCHAR_IDEOGRAPHIC: 0/1 (FALSE/TRUE)
  2215. *
  2216. * For undefined UProperty constant values, min/max values will be 0/-1.
  2217. *
  2218. * @param which UProperty selector constant, identifies which binary property to check.
  2219. * Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT
  2220. * or UCHAR_INT_START<=which<UCHAR_INT_LIMIT.
  2221. * @return Maximum value returned by u_getIntPropertyValue for a Unicode property.
  2222. * <=0 if the property selector is out of range.
  2223. *
  2224. * @see UProperty
  2225. * @see u_hasBinaryProperty
  2226. * @see u_getUnicodeVersion
  2227. * @see u_getIntPropertyMaxValue
  2228. * @see u_getIntPropertyValue
  2229. * @stable ICU 2.2
  2230. */
  2231. U_STABLE int32_t U_EXPORT2
  2232. u_getIntPropertyMaxValue(UProperty which);
  2233. /**
  2234. * Get the numeric value for a Unicode code point as defined in the
  2235. * Unicode Character Database.
  2236. *
  2237. * A "double" return type is necessary because
  2238. * some numeric values are fractions, negative, or too large for int32_t.
  2239. *
  2240. * For characters without any numeric values in the Unicode Character Database,
  2241. * this function will return U_NO_NUMERIC_VALUE.
  2242. * Note: This is different from the Unicode Standard which specifies NaN as the default value.
  2243. * (NaN is not available on all platforms.)
  2244. *
  2245. * Similar to java.lang.Character.getNumericValue(), but u_getNumericValue()
  2246. * also supports negative values, large values, and fractions,
  2247. * while Java's getNumericValue() returns values 10..35 for ASCII letters.
  2248. *
  2249. * @param c Code point to get the numeric value for.
  2250. * @return Numeric value of c, or U_NO_NUMERIC_VALUE if none is defined.
  2251. *
  2252. * @see U_NO_NUMERIC_VALUE
  2253. * @stable ICU 2.2
  2254. */
  2255. U_STABLE double U_EXPORT2
  2256. u_getNumericValue(UChar32 c);
  2257. /**
  2258. * Special value that is returned by u_getNumericValue when
  2259. * no numeric value is defined for a code point.
  2260. *
  2261. * @see u_getNumericValue
  2262. * @stable ICU 2.2
  2263. */
  2264. #define U_NO_NUMERIC_VALUE ((double)-123456789.)
  2265. /**
  2266. * Determines whether the specified code point has the general category "Ll"
  2267. * (lowercase letter).
  2268. *
  2269. * Same as java.lang.Character.isLowerCase().
  2270. *
  2271. * This misses some characters that are also lowercase but
  2272. * have a different general category value.
  2273. * In order to include those, use UCHAR_LOWERCASE.
  2274. *
  2275. * In addition to being equivalent to a Java function, this also serves
  2276. * as a C/POSIX migration function.
  2277. * See the comments about C/POSIX character classification functions in the
  2278. * documentation at the top of this header file.
  2279. *
  2280. * @param c the code point to be tested
  2281. * @return TRUE if the code point is an Ll lowercase letter
  2282. *
  2283. * @see UCHAR_LOWERCASE
  2284. * @see u_isupper
  2285. * @see u_istitle
  2286. * @stable ICU 2.0
  2287. */
  2288. U_STABLE UBool U_EXPORT2
  2289. u_islower(UChar32 c);
  2290. /**
  2291. * Determines whether the specified code point has the general category "Lu"
  2292. * (uppercase letter).
  2293. *
  2294. * Same as java.lang.Character.isUpperCase().
  2295. *
  2296. * This misses some characters that are also uppercase but
  2297. * have a different general category value.
  2298. * In order to include those, use UCHAR_UPPERCASE.
  2299. *
  2300. * In addition to being equivalent to a Java function, this also serves
  2301. * as a C/POSIX migration function.
  2302. * See the comments about C/POSIX character classification functions in the
  2303. * documentation at the top of this header file.
  2304. *
  2305. * @param c the code point to be tested
  2306. * @return TRUE if the code point is an Lu uppercase letter
  2307. *
  2308. * @see UCHAR_UPPERCASE
  2309. * @see u_islower
  2310. * @see u_istitle
  2311. * @see u_tolower
  2312. * @stable ICU 2.0
  2313. */
  2314. U_STABLE UBool U_EXPORT2
  2315. u_isupper(UChar32 c);
  2316. /**
  2317. * Determines whether the specified code point is a titlecase letter.
  2318. * True for general category "Lt" (titlecase letter).
  2319. *
  2320. * Same as java.lang.Character.isTitleCase().
  2321. *
  2322. * @param c the code point to be tested
  2323. * @return TRUE if the code point is an Lt titlecase letter
  2324. *
  2325. * @see u_isupper
  2326. * @see u_islower
  2327. * @see u_totitle
  2328. * @stable ICU 2.0
  2329. */
  2330. U_STABLE UBool U_EXPORT2
  2331. u_istitle(UChar32 c);
  2332. /**
  2333. * Determines whether the specified code point is a digit character according to Java.
  2334. * True for characters with general category "Nd" (decimal digit numbers).
  2335. * Beginning with Unicode 4, this is the same as
  2336. * testing for the Numeric_Type of Decimal.
  2337. *
  2338. * Same as java.lang.Character.isDigit().
  2339. *
  2340. * In addition to being equivalent to a Java function, this also serves
  2341. * as a C/POSIX migration function.
  2342. * See the comments about C/POSIX character classification functions in the
  2343. * documentation at the top of this header file.
  2344. *
  2345. * @param c the code point to be tested
  2346. * @return TRUE if the code point is a digit character according to Character.isDigit()
  2347. *
  2348. * @stable ICU 2.0
  2349. */
  2350. U_STABLE UBool U_EXPORT2
  2351. u_isdigit(UChar32 c);
  2352. /**
  2353. * Determines whether the specified code point is a letter character.
  2354. * True for general categories "L" (letters).
  2355. *
  2356. * Same as java.lang.Character.isLetter().
  2357. *
  2358. * In addition to being equivalent to a Java function, this also serves
  2359. * as a C/POSIX migration function.
  2360. * See the comments about C/POSIX character classification functions in the
  2361. * documentation at the top of this header file.
  2362. *
  2363. * @param c the code point to be tested
  2364. * @return TRUE if the code point is a letter character
  2365. *
  2366. * @see u_isdigit
  2367. * @see u_isalnum
  2368. * @stable ICU 2.0
  2369. */
  2370. U_STABLE UBool U_EXPORT2
  2371. u_isalpha(UChar32 c);
  2372. /**
  2373. * Determines whether the specified code point is an alphanumeric character
  2374. * (letter or digit) according to Java.
  2375. * True for characters with general categories
  2376. * "L" (letters) and "Nd" (decimal digit numbers).
  2377. *
  2378. * Same as java.lang.Character.isLetterOrDigit().
  2379. *
  2380. * In addition to being equivalent to a Java function, this also serves
  2381. * as a C/POSIX migration function.
  2382. * See the comments about C/POSIX character classification functions in the
  2383. * documentation at the top of this header file.
  2384. *
  2385. * @param c the code point to be tested
  2386. * @return TRUE if the code point is an alphanumeric character according to Character.isLetterOrDigit()
  2387. *
  2388. * @stable ICU 2.0
  2389. */
  2390. U_STABLE UBool U_EXPORT2
  2391. u_isalnum(UChar32 c);
  2392. /**
  2393. * Determines whether the specified code point is a hexadecimal digit.
  2394. * This is equivalent to u_digit(c, 16)>=0.
  2395. * True for characters with general category "Nd" (decimal digit numbers)
  2396. * as well as Latin letters a-f and A-F in both ASCII and Fullwidth ASCII.
  2397. * (That is, for letters with code points
  2398. * 0041..0046, 0061..0066, FF21..FF26, FF41..FF46.)
  2399. *
  2400. * In order to narrow the definition of hexadecimal digits to only ASCII
  2401. * characters, use (c<=0x7f && u_isxdigit(c)).
  2402. *
  2403. * This is a C/POSIX migration function.
  2404. * See the comments about C/POSIX character classification functions in the
  2405. * documentation at the top of this header file.
  2406. *
  2407. * @param c the code point to be tested
  2408. * @return TRUE if the code point is a hexadecimal digit
  2409. *
  2410. * @stable ICU 2.6
  2411. */
  2412. U_STABLE UBool U_EXPORT2
  2413. u_isxdigit(UChar32 c);
  2414. /**
  2415. * Determines whether the specified code point is a punctuation character.
  2416. * True for characters with general categories "P" (punctuation).
  2417. *
  2418. * This is a C/POSIX migration function.
  2419. * See the comments about C/POSIX character classification functions in the
  2420. * documentation at the top of this header file.
  2421. *
  2422. * @param c the code point to be tested
  2423. * @return TRUE if the code point is a punctuation character
  2424. *
  2425. * @stable ICU 2.6
  2426. */
  2427. U_STABLE UBool U_EXPORT2
  2428. u_ispunct(UChar32 c);
  2429. /**
  2430. * Determines whether the specified code point is a "graphic" character
  2431. * (printable, excluding spaces).
  2432. * TRUE for all characters except those with general categories
  2433. * "Cc" (control codes), "Cf" (format controls), "Cs" (surrogates),
  2434. * "Cn" (unassigned), and "Z" (separators).
  2435. *
  2436. * This is a C/POSIX migration function.
  2437. * See the comments about C/POSIX character classification functions in the
  2438. * documentation at the top of this header file.
  2439. *
  2440. * @param c the code point to be tested
  2441. * @return TRUE if the code point is a "graphic" character
  2442. *
  2443. * @stable ICU 2.6
  2444. */
  2445. U_STABLE UBool U_EXPORT2
  2446. u_isgraph(UChar32 c);
  2447. /**
  2448. * Determines whether the specified code point is a "blank" or "horizontal space",
  2449. * a character that visibly separates words on a line.
  2450. * The following are equivalent definitions:
  2451. *
  2452. * TRUE for Unicode White_Space characters except for "vertical space controls"
  2453. * where "vertical space controls" are the following characters:
  2454. * U+000A (LF) U+000B (VT) U+000C (FF) U+000D (CR) U+0085 (NEL) U+2028 (LS) U+2029 (PS)
  2455. *
  2456. * same as
  2457. *
  2458. * TRUE for U+0009 (TAB) and characters with general category "Zs" (space separators)
  2459. * except Zero Width Space (ZWSP, U+200B).
  2460. *
  2461. * Note: There are several ICU whitespace functions; please see the uchar.h
  2462. * file documentation for a detailed comparison.
  2463. *
  2464. * This is a C/POSIX migration function.
  2465. * See the comments about C/POSIX character classification functions in the
  2466. * documentation at the top of this header file.
  2467. *
  2468. * @param c the code point to be tested
  2469. * @return TRUE if the code point is a "blank"
  2470. *
  2471. * @stable ICU 2.6
  2472. */
  2473. U_STABLE UBool U_EXPORT2
  2474. u_isblank(UChar32 c);
  2475. /**
  2476. * Determines whether the specified code point is "defined",
  2477. * which usually means that it is assigned a character.
  2478. * True for general categories other than "Cn" (other, not assigned),
  2479. * i.e., true for all code points mentioned in UnicodeData.txt.
  2480. *
  2481. * Note that non-character code points (e.g., U+FDD0) are not "defined"
  2482. * (they are Cn), but surrogate code points are "defined" (Cs).
  2483. *
  2484. * Same as java.lang.Character.isDefined().
  2485. *
  2486. * @param c the code point to be tested
  2487. * @return TRUE if the code point is assigned a character
  2488. *
  2489. * @see u_isdigit
  2490. * @see u_isalpha
  2491. * @see u_isalnum
  2492. * @see u_isupper
  2493. * @see u_islower
  2494. * @see u_istitle
  2495. * @stable ICU 2.0
  2496. */
  2497. U_STABLE UBool U_EXPORT2
  2498. u_isdefined(UChar32 c);
  2499. /**
  2500. * Determines if the specified character is a space character or not.
  2501. *
  2502. * Note: There are several ICU whitespace functions; please see the uchar.h
  2503. * file documentation for a detailed comparison.
  2504. *
  2505. * This is a C/POSIX migration function.
  2506. * See the comments about C/POSIX character classification functions in the
  2507. * documentation at the top of this header file.
  2508. *
  2509. * @param c the character to be tested
  2510. * @return true if the character is a space character; false otherwise.
  2511. *
  2512. * @see u_isJavaSpaceChar
  2513. * @see u_isWhitespace
  2514. * @see u_isUWhiteSpace
  2515. * @stable ICU 2.0
  2516. */
  2517. U_STABLE UBool U_EXPORT2
  2518. u_isspace(UChar32 c);
  2519. /**
  2520. * Determine if the specified code point is a space character according to Java.
  2521. * True for characters with general categories "Z" (separators),
  2522. * which does not include control codes (e.g., TAB or Line Feed).
  2523. *
  2524. * Same as java.lang.Character.isSpaceChar().
  2525. *
  2526. * Note: There are several ICU whitespace functions; please see the uchar.h
  2527. * file documentation for a detailed comparison.
  2528. *
  2529. * @param c the code point to be tested
  2530. * @return TRUE if the code point is a space character according to Character.isSpaceChar()
  2531. *
  2532. * @see u_isspace
  2533. * @see u_isWhitespace
  2534. * @see u_isUWhiteSpace
  2535. * @stable ICU 2.6
  2536. */
  2537. U_STABLE UBool U_EXPORT2
  2538. u_isJavaSpaceChar(UChar32 c);
  2539. /**
  2540. * Determines if the specified code point is a whitespace character according to Java/ICU.
  2541. * A character is considered to be a Java whitespace character if and only
  2542. * if it satisfies one of the following criteria:
  2543. *
  2544. * - It is a Unicode Separator character (categories "Z" = "Zs" or "Zl" or "Zp"), but is not
  2545. * also a non-breaking space (U+00A0 NBSP or U+2007 Figure Space or U+202F Narrow NBSP).
  2546. * - It is U+0009 HORIZONTAL TABULATION.
  2547. * - It is U+000A LINE FEED.
  2548. * - It is U+000B VERTICAL TABULATION.
  2549. * - It is U+000C FORM FEED.
  2550. * - It is U+000D CARRIAGE RETURN.
  2551. * - It is U+001C FILE SEPARATOR.
  2552. * - It is U+001D GROUP SEPARATOR.
  2553. * - It is U+001E RECORD SEPARATOR.
  2554. * - It is U+001F UNIT SEPARATOR.
  2555. *
  2556. * This API tries to sync with the semantics of Java's
  2557. * java.lang.Character.isWhitespace(), but it may not return
  2558. * the exact same results because of the Unicode version
  2559. * difference.
  2560. *
  2561. * Note: Unicode 4.0.1 changed U+200B ZERO WIDTH SPACE from a Space Separator (Zs)
  2562. * to a Format Control (Cf). Since then, isWhitespace(0x200b) returns false.
  2563. * See http://www.unicode.org/versions/Unicode4.0.1/
  2564. *
  2565. * Note: There are several ICU whitespace functions; please see the uchar.h
  2566. * file documentation for a detailed comparison.
  2567. *
  2568. * @param c the code point to be tested
  2569. * @return TRUE if the code point is a whitespace character according to Java/ICU
  2570. *
  2571. * @see u_isspace
  2572. * @see u_isJavaSpaceChar
  2573. * @see u_isUWhiteSpace
  2574. * @stable ICU 2.0
  2575. */
  2576. U_STABLE UBool U_EXPORT2
  2577. u_isWhitespace(UChar32 c);
  2578. /**
  2579. * Determines whether the specified code point is a control character
  2580. * (as defined by this function).
  2581. * A control character is one of the following:
  2582. * - ISO 8-bit control character (U+0000..U+001f and U+007f..U+009f)
  2583. * - U_CONTROL_CHAR (Cc)
  2584. * - U_FORMAT_CHAR (Cf)
  2585. * - U_LINE_SEPARATOR (Zl)
  2586. * - U_PARAGRAPH_SEPARATOR (Zp)
  2587. *
  2588. * This is a C/POSIX migration function.
  2589. * See the comments about C/POSIX character classification functions in the
  2590. * documentation at the top of this header file.
  2591. *
  2592. * @param c the code point to be tested
  2593. * @return TRUE if the code point is a control character
  2594. *
  2595. * @see UCHAR_DEFAULT_IGNORABLE_CODE_POINT
  2596. * @see u_isprint
  2597. * @stable ICU 2.0
  2598. */
  2599. U_STABLE UBool U_EXPORT2
  2600. u_iscntrl(UChar32 c);
  2601. /**
  2602. * Determines whether the specified code point is an ISO control code.
  2603. * True for U+0000..U+001f and U+007f..U+009f (general category "Cc").
  2604. *
  2605. * Same as java.lang.Character.isISOControl().
  2606. *
  2607. * @param c the code point to be tested
  2608. * @return TRUE if the code point is an ISO control code
  2609. *
  2610. * @see u_iscntrl
  2611. * @stable ICU 2.6
  2612. */
  2613. U_STABLE UBool U_EXPORT2
  2614. u_isISOControl(UChar32 c);
  2615. /**
  2616. * Determines whether the specified code point is a printable character.
  2617. * True for general categories <em>other</em> than "C" (controls).
  2618. *
  2619. * This is a C/POSIX migration function.
  2620. * See the comments about C/POSIX character classification functions in the
  2621. * documentation at the top of this header file.
  2622. *
  2623. * @param c the code point to be tested
  2624. * @return TRUE if the code point is a printable character
  2625. *
  2626. * @see UCHAR_DEFAULT_IGNORABLE_CODE_POINT
  2627. * @see u_iscntrl
  2628. * @stable ICU 2.0
  2629. */
  2630. U_STABLE UBool U_EXPORT2
  2631. u_isprint(UChar32 c);
  2632. /**
  2633. * Determines whether the specified code point is a base character.
  2634. * True for general categories "L" (letters), "N" (numbers),
  2635. * "Mc" (spacing combining marks), and "Me" (enclosing marks).
  2636. *
  2637. * Note that this is different from the Unicode definition in
  2638. * chapter 3.5, conformance clause D13,
  2639. * which defines base characters to be all characters (not Cn)
  2640. * that do not graphically combine with preceding characters (M)
  2641. * and that are neither control (Cc) or format (Cf) characters.
  2642. *
  2643. * @param c the code point to be tested
  2644. * @return TRUE if the code point is a base character according to this function
  2645. *
  2646. * @see u_isalpha
  2647. * @see u_isdigit
  2648. * @stable ICU 2.0
  2649. */
  2650. U_STABLE UBool U_EXPORT2
  2651. u_isbase(UChar32 c);
  2652. /**
  2653. * Returns the bidirectional category value for the code point,
  2654. * which is used in the Unicode bidirectional algorithm
  2655. * (UAX #9 http://www.unicode.org/reports/tr9/).
  2656. * Note that some <em>unassigned</em> code points have bidi values
  2657. * of R or AL because they are in blocks that are reserved
  2658. * for Right-To-Left scripts.
  2659. *
  2660. * Same as java.lang.Character.getDirectionality()
  2661. *
  2662. * @param c the code point to be tested
  2663. * @return the bidirectional category (UCharDirection) value
  2664. *
  2665. * @see UCharDirection
  2666. * @stable ICU 2.0
  2667. */
  2668. U_STABLE UCharDirection U_EXPORT2
  2669. u_charDirection(UChar32 c);
  2670. /**
  2671. * Determines whether the code point has the Bidi_Mirrored property.
  2672. * This property is set for characters that are commonly used in
  2673. * Right-To-Left contexts and need to be displayed with a "mirrored"
  2674. * glyph.
  2675. *
  2676. * Same as java.lang.Character.isMirrored().
  2677. * Same as UCHAR_BIDI_MIRRORED
  2678. *
  2679. * @param c the code point to be tested
  2680. * @return TRUE if the character has the Bidi_Mirrored property
  2681. *
  2682. * @see UCHAR_BIDI_MIRRORED
  2683. * @stable ICU 2.0
  2684. */
  2685. U_STABLE UBool U_EXPORT2
  2686. u_isMirrored(UChar32 c);
  2687. /**
  2688. * Maps the specified character to a "mirror-image" character.
  2689. * For characters with the Bidi_Mirrored property, implementations
  2690. * sometimes need a "poor man's" mapping to another Unicode
  2691. * character (code point) such that the default glyph may serve
  2692. * as the mirror-image of the default glyph of the specified
  2693. * character. This is useful for text conversion to and from
  2694. * codepages with visual order, and for displays without glyph
  2695. * selection capabilities.
  2696. *
  2697. * @param c the code point to be mapped
  2698. * @return another Unicode code point that may serve as a mirror-image
  2699. * substitute, or c itself if there is no such mapping or c
  2700. * does not have the Bidi_Mirrored property
  2701. *
  2702. * @see UCHAR_BIDI_MIRRORED
  2703. * @see u_isMirrored
  2704. * @stable ICU 2.0
  2705. */
  2706. U_STABLE UChar32 U_EXPORT2
  2707. u_charMirror(UChar32 c);
  2708. /**
  2709. * Maps the specified character to its paired bracket character.
  2710. * For Bidi_Paired_Bracket_Type!=None, this is the same as u_charMirror().
  2711. * Otherwise c itself is returned.
  2712. * See http://www.unicode.org/reports/tr9/
  2713. *
  2714. * @param c the code point to be mapped
  2715. * @return the paired bracket code point,
  2716. * or c itself if there is no such mapping
  2717. * (Bidi_Paired_Bracket_Type=None)
  2718. *
  2719. * @see UCHAR_BIDI_PAIRED_BRACKET
  2720. * @see UCHAR_BIDI_PAIRED_BRACKET_TYPE
  2721. * @see u_charMirror
  2722. * @stable ICU 52
  2723. */
  2724. U_STABLE UChar32 U_EXPORT2
  2725. u_getBidiPairedBracket(UChar32 c);
  2726. /**
  2727. * Returns the general category value for the code point.
  2728. *
  2729. * Same as java.lang.Character.getType().
  2730. *
  2731. * @param c the code point to be tested
  2732. * @return the general category (UCharCategory) value
  2733. *
  2734. * @see UCharCategory
  2735. * @stable ICU 2.0
  2736. */
  2737. U_STABLE int8_t U_EXPORT2
  2738. u_charType(UChar32 c);
  2739. /**
  2740. * Get a single-bit bit set for the general category of a character.
  2741. * This bit set can be compared bitwise with U_GC_SM_MASK, U_GC_L_MASK, etc.
  2742. * Same as U_MASK(u_charType(c)).
  2743. *
  2744. * @param c the code point to be tested
  2745. * @return a single-bit mask corresponding to the general category (UCharCategory) value
  2746. *
  2747. * @see u_charType
  2748. * @see UCharCategory
  2749. * @see U_GC_CN_MASK
  2750. * @stable ICU 2.1
  2751. */
  2752. #define U_GET_GC_MASK(c) U_MASK(u_charType(c))
  2753. /**
  2754. * Callback from u_enumCharTypes(), is called for each contiguous range
  2755. * of code points c (where start<=c<limit)
  2756. * with the same Unicode general category ("character type").
  2757. *
  2758. * The callback function can stop the enumeration by returning FALSE.
  2759. *
  2760. * @param context an opaque pointer, as passed into utrie_enum()
  2761. * @param start the first code point in a contiguous range with value
  2762. * @param limit one past the last code point in a contiguous range with value
  2763. * @param type the general category for all code points in [start..limit[
  2764. * @return FALSE to stop the enumeration
  2765. *
  2766. * @stable ICU 2.1
  2767. * @see UCharCategory
  2768. * @see u_enumCharTypes
  2769. */
  2770. typedef UBool U_CALLCONV
  2771. UCharEnumTypeRange(const void *context, UChar32 start, UChar32 limit, UCharCategory type);
  2772. /**
  2773. * Enumerate efficiently all code points with their Unicode general categories.
  2774. *
  2775. * This is useful for building data structures (e.g., UnicodeSet's),
  2776. * for enumerating all assigned code points (type!=U_UNASSIGNED), etc.
  2777. *
  2778. * For each contiguous range of code points with a given general category ("character type"),
  2779. * the UCharEnumTypeRange function is called.
  2780. * Adjacent ranges have different types.
  2781. * The Unicode Standard guarantees that the numeric value of the type is 0..31.
  2782. *
  2783. * @param enumRange a pointer to a function that is called for each contiguous range
  2784. * of code points with the same general category
  2785. * @param context an opaque pointer that is passed on to the callback function
  2786. *
  2787. * @stable ICU 2.1
  2788. * @see UCharCategory
  2789. * @see UCharEnumTypeRange
  2790. */
  2791. U_STABLE void U_EXPORT2
  2792. u_enumCharTypes(UCharEnumTypeRange *enumRange, const void *context);
  2793. #if !UCONFIG_NO_NORMALIZATION
  2794. /**
  2795. * Returns the combining class of the code point as specified in UnicodeData.txt.
  2796. *
  2797. * @param c the code point of the character
  2798. * @return the combining class of the character
  2799. * @stable ICU 2.0
  2800. */
  2801. U_STABLE uint8_t U_EXPORT2
  2802. u_getCombiningClass(UChar32 c);
  2803. #endif
  2804. /**
  2805. * Returns the decimal digit value of a decimal digit character.
  2806. * Such characters have the general category "Nd" (decimal digit numbers)
  2807. * and a Numeric_Type of Decimal.
  2808. *
  2809. * Unlike ICU releases before 2.6, no digit values are returned for any
  2810. * Han characters because Han number characters are often used with a special
  2811. * Chinese-style number format (with characters for powers of 10 in between)
  2812. * instead of in decimal-positional notation.
  2813. * Unicode 4 explicitly assigns Han number characters the Numeric_Type
  2814. * Numeric instead of Decimal.
  2815. * See Jitterbug 1483 for more details.
  2816. *
  2817. * Use u_getIntPropertyValue(c, UCHAR_NUMERIC_TYPE) and u_getNumericValue()
  2818. * for complete numeric Unicode properties.
  2819. *
  2820. * @param c the code point for which to get the decimal digit value
  2821. * @return the decimal digit value of c,
  2822. * or -1 if c is not a decimal digit character
  2823. *
  2824. * @see u_getNumericValue
  2825. * @stable ICU 2.0
  2826. */
  2827. U_STABLE int32_t U_EXPORT2
  2828. u_charDigitValue(UChar32 c);
  2829. /**
  2830. * Returns the Unicode allocation block that contains the character.
  2831. *
  2832. * @param c the code point to be tested
  2833. * @return the block value (UBlockCode) for c
  2834. *
  2835. * @see UBlockCode
  2836. * @stable ICU 2.0
  2837. */
  2838. U_STABLE UBlockCode U_EXPORT2
  2839. ublock_getCode(UChar32 c);
  2840. /**
  2841. * Retrieve the name of a Unicode character.
  2842. * Depending on <code>nameChoice</code>, the character name written
  2843. * into the buffer is the "modern" name or the name that was defined
  2844. * in Unicode version 1.0.
  2845. * The name contains only "invariant" characters
  2846. * like A-Z, 0-9, space, and '-'.
  2847. * Unicode 1.0 names are only retrieved if they are different from the modern
  2848. * names and if the data file contains the data for them. gennames may or may
  2849. * not be called with a command line option to include 1.0 names in unames.dat.
  2850. *
  2851. * @param code The character (code point) for which to get the name.
  2852. * It must be <code>0<=code<=0x10ffff</code>.
  2853. * @param nameChoice Selector for which name to get.
  2854. * @param buffer Destination address for copying the name.
  2855. * The name will always be zero-terminated.
  2856. * If there is no name, then the buffer will be set to the empty string.
  2857. * @param bufferLength <code>==sizeof(buffer)</code>
  2858. * @param pErrorCode Pointer to a UErrorCode variable;
  2859. * check for <code>U_SUCCESS()</code> after <code>u_charName()</code>
  2860. * returns.
  2861. * @return The length of the name, or 0 if there is no name for this character.
  2862. * If the bufferLength is less than or equal to the length, then the buffer
  2863. * contains the truncated name and the returned length indicates the full
  2864. * length of the name.
  2865. * The length does not include the zero-termination.
  2866. *
  2867. * @see UCharNameChoice
  2868. * @see u_charFromName
  2869. * @see u_enumCharNames
  2870. * @stable ICU 2.0
  2871. */
  2872. U_STABLE int32_t U_EXPORT2
  2873. u_charName(UChar32 code, UCharNameChoice nameChoice,
  2874. char *buffer, int32_t bufferLength,
  2875. UErrorCode *pErrorCode);
  2876. #ifndef U_HIDE_DEPRECATED_API
  2877. /**
  2878. * Returns an empty string.
  2879. * Used to return the ISO 10646 comment for a character.
  2880. * The Unicode ISO_Comment property is deprecated and has no values.
  2881. *
  2882. * @param c The character (code point) for which to get the ISO comment.
  2883. * It must be <code>0<=c<=0x10ffff</code>.
  2884. * @param dest Destination address for copying the comment.
  2885. * The comment will be zero-terminated if possible.
  2886. * If there is no comment, then the buffer will be set to the empty string.
  2887. * @param destCapacity <code>==sizeof(dest)</code>
  2888. * @param pErrorCode Pointer to a UErrorCode variable;
  2889. * check for <code>U_SUCCESS()</code> after <code>u_getISOComment()</code>
  2890. * returns.
  2891. * @return 0
  2892. *
  2893. * @deprecated ICU 49
  2894. */
  2895. U_DEPRECATED int32_t U_EXPORT2
  2896. u_getISOComment(UChar32 c,
  2897. char *dest, int32_t destCapacity,
  2898. UErrorCode *pErrorCode);
  2899. #endif /* U_HIDE_DEPRECATED_API */
  2900. /**
  2901. * Find a Unicode character by its name and return its code point value.
  2902. * The name is matched exactly and completely.
  2903. * If the name does not correspond to a code point, <i>pErrorCode</i>
  2904. * is set to <code>U_INVALID_CHAR_FOUND</code>.
  2905. * A Unicode 1.0 name is matched only if it differs from the modern name.
  2906. * Unicode names are all uppercase. Extended names are lowercase followed
  2907. * by an uppercase hexadecimal number, and within angle brackets.
  2908. *
  2909. * @param nameChoice Selector for which name to match.
  2910. * @param name The name to match.
  2911. * @param pErrorCode Pointer to a UErrorCode variable
  2912. * @return The Unicode value of the code point with the given name,
  2913. * or an undefined value if there is no such code point.
  2914. *
  2915. * @see UCharNameChoice
  2916. * @see u_charName
  2917. * @see u_enumCharNames
  2918. * @stable ICU 1.7
  2919. */
  2920. U_STABLE UChar32 U_EXPORT2
  2921. u_charFromName(UCharNameChoice nameChoice,
  2922. const char *name,
  2923. UErrorCode *pErrorCode);
  2924. /**
  2925. * Type of a callback function for u_enumCharNames() that gets called
  2926. * for each Unicode character with the code point value and
  2927. * the character name.
  2928. * If such a function returns FALSE, then the enumeration is stopped.
  2929. *
  2930. * @param context The context pointer that was passed to u_enumCharNames().
  2931. * @param code The Unicode code point for the character with this name.
  2932. * @param nameChoice Selector for which kind of names is enumerated.
  2933. * @param name The character's name, zero-terminated.
  2934. * @param length The length of the name.
  2935. * @return TRUE if the enumeration should continue, FALSE to stop it.
  2936. *
  2937. * @see UCharNameChoice
  2938. * @see u_enumCharNames
  2939. * @stable ICU 1.7
  2940. */
  2941. typedef UBool U_CALLCONV UEnumCharNamesFn(void *context,
  2942. UChar32 code,
  2943. UCharNameChoice nameChoice,
  2944. const char *name,
  2945. int32_t length);
  2946. /**
  2947. * Enumerate all assigned Unicode characters between the start and limit
  2948. * code points (start inclusive, limit exclusive) and call a function
  2949. * for each, passing the code point value and the character name.
  2950. * For Unicode 1.0 names, only those are enumerated that differ from the
  2951. * modern names.
  2952. *
  2953. * @param start The first code point in the enumeration range.
  2954. * @param limit One more than the last code point in the enumeration range
  2955. * (the first one after the range).
  2956. * @param fn The function that is to be called for each character name.
  2957. * @param context An arbitrary pointer that is passed to the function.
  2958. * @param nameChoice Selector for which kind of names to enumerate.
  2959. * @param pErrorCode Pointer to a UErrorCode variable
  2960. *
  2961. * @see UCharNameChoice
  2962. * @see UEnumCharNamesFn
  2963. * @see u_charName
  2964. * @see u_charFromName
  2965. * @stable ICU 1.7
  2966. */
  2967. U_STABLE void U_EXPORT2
  2968. u_enumCharNames(UChar32 start, UChar32 limit,
  2969. UEnumCharNamesFn *fn,
  2970. void *context,
  2971. UCharNameChoice nameChoice,
  2972. UErrorCode *pErrorCode);
  2973. /**
  2974. * Return the Unicode name for a given property, as given in the
  2975. * Unicode database file PropertyAliases.txt.
  2976. *
  2977. * In addition, this function maps the property
  2978. * UCHAR_GENERAL_CATEGORY_MASK to the synthetic names "gcm" /
  2979. * "General_Category_Mask". These names are not in
  2980. * PropertyAliases.txt.
  2981. *
  2982. * @param property UProperty selector other than UCHAR_INVALID_CODE.
  2983. * If out of range, NULL is returned.
  2984. *
  2985. * @param nameChoice selector for which name to get. If out of range,
  2986. * NULL is returned. All properties have a long name. Most
  2987. * have a short name, but some do not. Unicode allows for
  2988. * additional names; if present these will be returned by
  2989. * U_LONG_PROPERTY_NAME + i, where i=1, 2,...
  2990. *
  2991. * @return a pointer to the name, or NULL if either the
  2992. * property or the nameChoice is out of range. If a given
  2993. * nameChoice returns NULL, then all larger values of
  2994. * nameChoice will return NULL, with one exception: if NULL is
  2995. * returned for U_SHORT_PROPERTY_NAME, then
  2996. * U_LONG_PROPERTY_NAME (and higher) may still return a
  2997. * non-NULL value. The returned pointer is valid until
  2998. * u_cleanup() is called.
  2999. *
  3000. * @see UProperty
  3001. * @see UPropertyNameChoice
  3002. * @stable ICU 2.4
  3003. */
  3004. U_STABLE const char* U_EXPORT2
  3005. u_getPropertyName(UProperty property,
  3006. UPropertyNameChoice nameChoice);
  3007. /**
  3008. * Return the UProperty enum for a given property name, as specified
  3009. * in the Unicode database file PropertyAliases.txt. Short, long, and
  3010. * any other variants are recognized.
  3011. *
  3012. * In addition, this function maps the synthetic names "gcm" /
  3013. * "General_Category_Mask" to the property
  3014. * UCHAR_GENERAL_CATEGORY_MASK. These names are not in
  3015. * PropertyAliases.txt.
  3016. *
  3017. * @param alias the property name to be matched. The name is compared
  3018. * using "loose matching" as described in PropertyAliases.txt.
  3019. *
  3020. * @return a UProperty enum, or UCHAR_INVALID_CODE if the given name
  3021. * does not match any property.
  3022. *
  3023. * @see UProperty
  3024. * @stable ICU 2.4
  3025. */
  3026. U_STABLE UProperty U_EXPORT2
  3027. u_getPropertyEnum(const char* alias);
  3028. /**
  3029. * Return the Unicode name for a given property value, as given in the
  3030. * Unicode database file PropertyValueAliases.txt.
  3031. *
  3032. * Note: Some of the names in PropertyValueAliases.txt can only be
  3033. * retrieved using UCHAR_GENERAL_CATEGORY_MASK, not
  3034. * UCHAR_GENERAL_CATEGORY. These include: "C" / "Other", "L" /
  3035. * "Letter", "LC" / "Cased_Letter", "M" / "Mark", "N" / "Number", "P"
  3036. * / "Punctuation", "S" / "Symbol", and "Z" / "Separator".
  3037. *
  3038. * @param property UProperty selector constant.
  3039. * Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT
  3040. * or UCHAR_INT_START<=which<UCHAR_INT_LIMIT
  3041. * or UCHAR_MASK_START<=which<UCHAR_MASK_LIMIT.
  3042. * If out of range, NULL is returned.
  3043. *
  3044. * @param value selector for a value for the given property. If out
  3045. * of range, NULL is returned. In general, valid values range
  3046. * from 0 up to some maximum. There are a few exceptions:
  3047. * (1.) UCHAR_BLOCK values begin at the non-zero value
  3048. * UBLOCK_BASIC_LATIN. (2.) UCHAR_CANONICAL_COMBINING_CLASS
  3049. * values are not contiguous and range from 0..240. (3.)
  3050. * UCHAR_GENERAL_CATEGORY_MASK values are not values of
  3051. * UCharCategory, but rather mask values produced by
  3052. * U_GET_GC_MASK(). This allows grouped categories such as
  3053. * [:L:] to be represented. Mask values range
  3054. * non-contiguously from 1..U_GC_P_MASK.
  3055. *
  3056. * @param nameChoice selector for which name to get. If out of range,
  3057. * NULL is returned. All values have a long name. Most have
  3058. * a short name, but some do not. Unicode allows for
  3059. * additional names; if present these will be returned by
  3060. * U_LONG_PROPERTY_NAME + i, where i=1, 2,...
  3061. * @return a pointer to the name, or NULL if either the
  3062. * property or the nameChoice is out of range. If a given
  3063. * nameChoice returns NULL, then all larger values of
  3064. * nameChoice will return NULL, with one exception: if NULL is
  3065. * returned for U_SHORT_PROPERTY_NAME, then
  3066. * U_LONG_PROPERTY_NAME (and higher) may still return a
  3067. * non-NULL value. The returned pointer is valid until
  3068. * u_cleanup() is called.
  3069. *
  3070. * @see UProperty
  3071. * @see UPropertyNameChoice
  3072. * @stable ICU 2.4
  3073. */
  3074. U_STABLE const char* U_EXPORT2
  3075. u_getPropertyValueName(UProperty property,
  3076. int32_t value,
  3077. UPropertyNameChoice nameChoice);
  3078. /**
  3079. * Return the property value integer for a given value name, as
  3080. * specified in the Unicode database file PropertyValueAliases.txt.
  3081. * Short, long, and any other variants are recognized.
  3082. *
  3083. * Note: Some of the names in PropertyValueAliases.txt will only be
  3084. * recognized with UCHAR_GENERAL_CATEGORY_MASK, not
  3085. * UCHAR_GENERAL_CATEGORY. These include: "C" / "Other", "L" /
  3086. * "Letter", "LC" / "Cased_Letter", "M" / "Mark", "N" / "Number", "P"
  3087. * / "Punctuation", "S" / "Symbol", and "Z" / "Separator".
  3088. *
  3089. * @param property UProperty selector constant.
  3090. * Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT
  3091. * or UCHAR_INT_START<=which<UCHAR_INT_LIMIT
  3092. * or UCHAR_MASK_START<=which<UCHAR_MASK_LIMIT.
  3093. * If out of range, UCHAR_INVALID_CODE is returned.
  3094. *
  3095. * @param alias the value name to be matched. The name is compared
  3096. * using "loose matching" as described in
  3097. * PropertyValueAliases.txt.
  3098. *
  3099. * @return a value integer or UCHAR_INVALID_CODE if the given name
  3100. * does not match any value of the given property, or if the
  3101. * property is invalid. Note: UCHAR_GENERAL_CATEGORY_MASK values
  3102. * are not values of UCharCategory, but rather mask values
  3103. * produced by U_GET_GC_MASK(). This allows grouped
  3104. * categories such as [:L:] to be represented.
  3105. *
  3106. * @see UProperty
  3107. * @stable ICU 2.4
  3108. */
  3109. U_STABLE int32_t U_EXPORT2
  3110. u_getPropertyValueEnum(UProperty property,
  3111. const char* alias);
  3112. /**
  3113. * Determines if the specified character is permissible as the
  3114. * first character in an identifier according to Unicode
  3115. * (The Unicode Standard, Version 3.0, chapter 5.16 Identifiers).
  3116. * True for characters with general categories "L" (letters) and "Nl" (letter numbers).
  3117. *
  3118. * Same as java.lang.Character.isUnicodeIdentifierStart().
  3119. * Same as UCHAR_ID_START
  3120. *
  3121. * @param c the code point to be tested
  3122. * @return TRUE if the code point may start an identifier
  3123. *
  3124. * @see UCHAR_ID_START
  3125. * @see u_isalpha
  3126. * @see u_isIDPart
  3127. * @stable ICU 2.0
  3128. */
  3129. U_STABLE UBool U_EXPORT2
  3130. u_isIDStart(UChar32 c);
  3131. /**
  3132. * Determines if the specified character is permissible
  3133. * in an identifier according to Java.
  3134. * True for characters with general categories "L" (letters),
  3135. * "Nl" (letter numbers), "Nd" (decimal digits),
  3136. * "Mc" and "Mn" (combining marks), "Pc" (connecting punctuation), and
  3137. * u_isIDIgnorable(c).
  3138. *
  3139. * Same as java.lang.Character.isUnicodeIdentifierPart().
  3140. * Almost the same as Unicode's ID_Continue (UCHAR_ID_CONTINUE)
  3141. * except that Unicode recommends to ignore Cf which is less than
  3142. * u_isIDIgnorable(c).
  3143. *
  3144. * @param c the code point to be tested
  3145. * @return TRUE if the code point may occur in an identifier according to Java
  3146. *
  3147. * @see UCHAR_ID_CONTINUE
  3148. * @see u_isIDStart
  3149. * @see u_isIDIgnorable
  3150. * @stable ICU 2.0
  3151. */
  3152. U_STABLE UBool U_EXPORT2
  3153. u_isIDPart(UChar32 c);
  3154. /**
  3155. * Determines if the specified character should be regarded
  3156. * as an ignorable character in an identifier,
  3157. * according to Java.
  3158. * True for characters with general category "Cf" (format controls) as well as
  3159. * non-whitespace ISO controls
  3160. * (U+0000..U+0008, U+000E..U+001B, U+007F..U+009F).
  3161. *
  3162. * Same as java.lang.Character.isIdentifierIgnorable().
  3163. *
  3164. * Note that Unicode just recommends to ignore Cf (format controls).
  3165. *
  3166. * @param c the code point to be tested
  3167. * @return TRUE if the code point is ignorable in identifiers according to Java
  3168. *
  3169. * @see UCHAR_DEFAULT_IGNORABLE_CODE_POINT
  3170. * @see u_isIDStart
  3171. * @see u_isIDPart
  3172. * @stable ICU 2.0
  3173. */
  3174. U_STABLE UBool U_EXPORT2
  3175. u_isIDIgnorable(UChar32 c);
  3176. /**
  3177. * Determines if the specified character is permissible as the
  3178. * first character in a Java identifier.
  3179. * In addition to u_isIDStart(c), true for characters with
  3180. * general categories "Sc" (currency symbols) and "Pc" (connecting punctuation).
  3181. *
  3182. * Same as java.lang.Character.isJavaIdentifierStart().
  3183. *
  3184. * @param c the code point to be tested
  3185. * @return TRUE if the code point may start a Java identifier
  3186. *
  3187. * @see u_isJavaIDPart
  3188. * @see u_isalpha
  3189. * @see u_isIDStart
  3190. * @stable ICU 2.0
  3191. */
  3192. U_STABLE UBool U_EXPORT2
  3193. u_isJavaIDStart(UChar32 c);
  3194. /**
  3195. * Determines if the specified character is permissible
  3196. * in a Java identifier.
  3197. * In addition to u_isIDPart(c), true for characters with
  3198. * general category "Sc" (currency symbols).
  3199. *
  3200. * Same as java.lang.Character.isJavaIdentifierPart().
  3201. *
  3202. * @param c the code point to be tested
  3203. * @return TRUE if the code point may occur in a Java identifier
  3204. *
  3205. * @see u_isIDIgnorable
  3206. * @see u_isJavaIDStart
  3207. * @see u_isalpha
  3208. * @see u_isdigit
  3209. * @see u_isIDPart
  3210. * @stable ICU 2.0
  3211. */
  3212. U_STABLE UBool U_EXPORT2
  3213. u_isJavaIDPart(UChar32 c);
  3214. /**
  3215. * The given character is mapped to its lowercase equivalent according to
  3216. * UnicodeData.txt; if the character has no lowercase equivalent, the character
  3217. * itself is returned.
  3218. *
  3219. * Same as java.lang.Character.toLowerCase().
  3220. *
  3221. * This function only returns the simple, single-code point case mapping.
  3222. * Full case mappings should be used whenever possible because they produce
  3223. * better results by working on whole strings.
  3224. * They take into account the string context and the language and can map
  3225. * to a result string with a different length as appropriate.
  3226. * Full case mappings are applied by the string case mapping functions,
  3227. * see ustring.h and the UnicodeString class.
  3228. * See also the User Guide chapter on C/POSIX migration:
  3229. * http://icu-project.org/userguide/posix.html#case_mappings
  3230. *
  3231. * @param c the code point to be mapped
  3232. * @return the Simple_Lowercase_Mapping of the code point, if any;
  3233. * otherwise the code point itself.
  3234. * @stable ICU 2.0
  3235. */
  3236. U_STABLE UChar32 U_EXPORT2
  3237. u_tolower(UChar32 c);
  3238. /**
  3239. * The given character is mapped to its uppercase equivalent according to UnicodeData.txt;
  3240. * if the character has no uppercase equivalent, the character itself is
  3241. * returned.
  3242. *
  3243. * Same as java.lang.Character.toUpperCase().
  3244. *
  3245. * This function only returns the simple, single-code point case mapping.
  3246. * Full case mappings should be used whenever possible because they produce
  3247. * better results by working on whole strings.
  3248. * They take into account the string context and the language and can map
  3249. * to a result string with a different length as appropriate.
  3250. * Full case mappings are applied by the string case mapping functions,
  3251. * see ustring.h and the UnicodeString class.
  3252. * See also the User Guide chapter on C/POSIX migration:
  3253. * http://icu-project.org/userguide/posix.html#case_mappings
  3254. *
  3255. * @param c the code point to be mapped
  3256. * @return the Simple_Uppercase_Mapping of the code point, if any;
  3257. * otherwise the code point itself.
  3258. * @stable ICU 2.0
  3259. */
  3260. U_STABLE UChar32 U_EXPORT2
  3261. u_toupper(UChar32 c);
  3262. /**
  3263. * The given character is mapped to its titlecase equivalent
  3264. * according to UnicodeData.txt;
  3265. * if none is defined, the character itself is returned.
  3266. *
  3267. * Same as java.lang.Character.toTitleCase().
  3268. *
  3269. * This function only returns the simple, single-code point case mapping.
  3270. * Full case mappings should be used whenever possible because they produce
  3271. * better results by working on whole strings.
  3272. * They take into account the string context and the language and can map
  3273. * to a result string with a different length as appropriate.
  3274. * Full case mappings are applied by the string case mapping functions,
  3275. * see ustring.h and the UnicodeString class.
  3276. * See also the User Guide chapter on C/POSIX migration:
  3277. * http://icu-project.org/userguide/posix.html#case_mappings
  3278. *
  3279. * @param c the code point to be mapped
  3280. * @return the Simple_Titlecase_Mapping of the code point, if any;
  3281. * otherwise the code point itself.
  3282. * @stable ICU 2.0
  3283. */
  3284. U_STABLE UChar32 U_EXPORT2
  3285. u_totitle(UChar32 c);
  3286. /** Option value for case folding: use default mappings defined in CaseFolding.txt. @stable ICU 2.0 */
  3287. #define U_FOLD_CASE_DEFAULT 0
  3288. /**
  3289. * Option value for case folding:
  3290. *
  3291. * Use the modified set of mappings provided in CaseFolding.txt to handle dotted I
  3292. * and dotless i appropriately for Turkic languages (tr, az).
  3293. *
  3294. * Before Unicode 3.2, CaseFolding.txt contains mappings marked with 'I' that
  3295. * are to be included for default mappings and
  3296. * excluded for the Turkic-specific mappings.
  3297. *
  3298. * Unicode 3.2 CaseFolding.txt instead contains mappings marked with 'T' that
  3299. * are to be excluded for default mappings and
  3300. * included for the Turkic-specific mappings.
  3301. *
  3302. * @stable ICU 2.0
  3303. */
  3304. #define U_FOLD_CASE_EXCLUDE_SPECIAL_I 1
  3305. /**
  3306. * The given character is mapped to its case folding equivalent according to
  3307. * UnicodeData.txt and CaseFolding.txt;
  3308. * if the character has no case folding equivalent, the character
  3309. * itself is returned.
  3310. *
  3311. * This function only returns the simple, single-code point case mapping.
  3312. * Full case mappings should be used whenever possible because they produce
  3313. * better results by working on whole strings.
  3314. * They take into account the string context and the language and can map
  3315. * to a result string with a different length as appropriate.
  3316. * Full case mappings are applied by the string case mapping functions,
  3317. * see ustring.h and the UnicodeString class.
  3318. * See also the User Guide chapter on C/POSIX migration:
  3319. * http://icu-project.org/userguide/posix.html#case_mappings
  3320. *
  3321. * @param c the code point to be mapped
  3322. * @param options Either U_FOLD_CASE_DEFAULT or U_FOLD_CASE_EXCLUDE_SPECIAL_I
  3323. * @return the Simple_Case_Folding of the code point, if any;
  3324. * otherwise the code point itself.
  3325. * @stable ICU 2.0
  3326. */
  3327. U_STABLE UChar32 U_EXPORT2
  3328. u_foldCase(UChar32 c, uint32_t options);
  3329. /**
  3330. * Returns the decimal digit value of the code point in the
  3331. * specified radix.
  3332. *
  3333. * If the radix is not in the range <code>2<=radix<=36</code> or if the
  3334. * value of <code>c</code> is not a valid digit in the specified
  3335. * radix, <code>-1</code> is returned. A character is a valid digit
  3336. * if at least one of the following is true:
  3337. * <ul>
  3338. * <li>The character has a decimal digit value.
  3339. * Such characters have the general category "Nd" (decimal digit numbers)
  3340. * and a Numeric_Type of Decimal.
  3341. * In this case the value is the character's decimal digit value.</li>
  3342. * <li>The character is one of the uppercase Latin letters
  3343. * <code>'A'</code> through <code>'Z'</code>.
  3344. * In this case the value is <code>c-'A'+10</code>.</li>
  3345. * <li>The character is one of the lowercase Latin letters
  3346. * <code>'a'</code> through <code>'z'</code>.
  3347. * In this case the value is <code>ch-'a'+10</code>.</li>
  3348. * <li>Latin letters from both the ASCII range (0061..007A, 0041..005A)
  3349. * as well as from the Fullwidth ASCII range (FF41..FF5A, FF21..FF3A)
  3350. * are recognized.</li>
  3351. * </ul>
  3352. *
  3353. * Same as java.lang.Character.digit().
  3354. *
  3355. * @param ch the code point to be tested.
  3356. * @param radix the radix.
  3357. * @return the numeric value represented by the character in the
  3358. * specified radix,
  3359. * or -1 if there is no value or if the value exceeds the radix.
  3360. *
  3361. * @see UCHAR_NUMERIC_TYPE
  3362. * @see u_forDigit
  3363. * @see u_charDigitValue
  3364. * @see u_isdigit
  3365. * @stable ICU 2.0
  3366. */
  3367. U_STABLE int32_t U_EXPORT2
  3368. u_digit(UChar32 ch, int8_t radix);
  3369. /**
  3370. * Determines the character representation for a specific digit in
  3371. * the specified radix. If the value of <code>radix</code> is not a
  3372. * valid radix, or the value of <code>digit</code> is not a valid
  3373. * digit in the specified radix, the null character
  3374. * (<code>U+0000</code>) is returned.
  3375. * <p>
  3376. * The <code>radix</code> argument is valid if it is greater than or
  3377. * equal to 2 and less than or equal to 36.
  3378. * The <code>digit</code> argument is valid if
  3379. * <code>0 <= digit < radix</code>.
  3380. * <p>
  3381. * If the digit is less than 10, then
  3382. * <code>'0' + digit</code> is returned. Otherwise, the value
  3383. * <code>'a' + digit - 10</code> is returned.
  3384. *
  3385. * Same as java.lang.Character.forDigit().
  3386. *
  3387. * @param digit the number to convert to a character.
  3388. * @param radix the radix.
  3389. * @return the <code>char</code> representation of the specified digit
  3390. * in the specified radix.
  3391. *
  3392. * @see u_digit
  3393. * @see u_charDigitValue
  3394. * @see u_isdigit
  3395. * @stable ICU 2.0
  3396. */
  3397. U_STABLE UChar32 U_EXPORT2
  3398. u_forDigit(int32_t digit, int8_t radix);
  3399. /**
  3400. * Get the "age" of the code point.
  3401. * The "age" is the Unicode version when the code point was first
  3402. * designated (as a non-character or for Private Use)
  3403. * or assigned a character.
  3404. * This can be useful to avoid emitting code points to receiving
  3405. * processes that do not accept newer characters.
  3406. * The data is from the UCD file DerivedAge.txt.
  3407. *
  3408. * @param c The code point.
  3409. * @param versionArray The Unicode version number array, to be filled in.
  3410. *
  3411. * @stable ICU 2.1
  3412. */
  3413. U_STABLE void U_EXPORT2
  3414. u_charAge(UChar32 c, UVersionInfo versionArray);
  3415. /**
  3416. * Gets the Unicode version information.
  3417. * The version array is filled in with the version information
  3418. * for the Unicode standard that is currently used by ICU.
  3419. * For example, Unicode version 3.1.1 is represented as an array with
  3420. * the values { 3, 1, 1, 0 }.
  3421. *
  3422. * @param versionArray an output array that will be filled in with
  3423. * the Unicode version number
  3424. * @stable ICU 2.0
  3425. */
  3426. U_STABLE void U_EXPORT2
  3427. u_getUnicodeVersion(UVersionInfo versionArray);
  3428. #if !UCONFIG_NO_NORMALIZATION
  3429. /**
  3430. * Get the FC_NFKC_Closure property string for a character.
  3431. * See Unicode Standard Annex #15 for details, search for "FC_NFKC_Closure"
  3432. * or for "FNC": http://www.unicode.org/reports/tr15/
  3433. *
  3434. * @param c The character (code point) for which to get the FC_NFKC_Closure string.
  3435. * It must be <code>0<=c<=0x10ffff</code>.
  3436. * @param dest Destination address for copying the string.
  3437. * The string will be zero-terminated if possible.
  3438. * If there is no FC_NFKC_Closure string,
  3439. * then the buffer will be set to the empty string.
  3440. * @param destCapacity <code>==sizeof(dest)</code>
  3441. * @param pErrorCode Pointer to a UErrorCode variable.
  3442. * @return The length of the string, or 0 if there is no FC_NFKC_Closure string for this character.
  3443. * If the destCapacity is less than or equal to the length, then the buffer
  3444. * contains the truncated name and the returned length indicates the full
  3445. * length of the name.
  3446. * The length does not include the zero-termination.
  3447. *
  3448. * @stable ICU 2.2
  3449. */
  3450. U_STABLE int32_t U_EXPORT2
  3451. u_getFC_NFKC_Closure(UChar32 c, UChar *dest, int32_t destCapacity, UErrorCode *pErrorCode);
  3452. #endif
  3453. U_CDECL_END
  3454. #endif /*_UCHAR*/
  3455. /*eof*/