uchar.h 116 KB

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