uchar.h 123 KB

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