@swiftbrowser/wasm-sdk-foundation 0.0.0-stage → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (368) hide show
  1. package/LICENSE.txt +1445 -0
  2. package/README.md +24 -2
  3. package/files.json +366 -0
  4. package/package.json +18 -4
  5. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/HTMLparser.h +320 -0
  6. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/HTMLtree.h +147 -0
  7. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/SAX.h +204 -0
  8. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/SAX2.h +173 -0
  9. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/c14n.h +128 -0
  10. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/catalog.h +182 -0
  11. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/chvalid.h +230 -0
  12. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/debugXML.h +217 -0
  13. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/dict.h +81 -0
  14. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/encoding.h +233 -0
  15. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/entities.h +151 -0
  16. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/globals.h +529 -0
  17. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/hash.h +236 -0
  18. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/list.h +137 -0
  19. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/nanoftp.h +186 -0
  20. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/nanohttp.h +81 -0
  21. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/parser.h +1265 -0
  22. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/parserInternals.h +662 -0
  23. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/pattern.h +100 -0
  24. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/relaxng.h +218 -0
  25. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/schemasInternals.h +958 -0
  26. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/schematron.h +142 -0
  27. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/threads.h +94 -0
  28. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/tree.h +1314 -0
  29. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/uri.h +94 -0
  30. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/valid.h +448 -0
  31. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xinclude.h +129 -0
  32. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xlink.h +189 -0
  33. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlIO.h +369 -0
  34. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlautomata.h +146 -0
  35. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlerror.h +919 -0
  36. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlexports.h +50 -0
  37. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlmemory.h +228 -0
  38. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlmodule.h +57 -0
  39. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlreader.h +428 -0
  40. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlregexp.h +222 -0
  41. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlsave.h +88 -0
  42. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlschemas.h +246 -0
  43. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlschemastypes.h +152 -0
  44. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlstring.h +140 -0
  45. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlunicode.h +202 -0
  46. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlversion.h +526 -0
  47. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xmlwriter.h +488 -0
  48. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xpath.h +575 -0
  49. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xpathInternals.h +632 -0
  50. package/wasm32-unknown-wasip1/WASI.sdk/include/libxml2/libxml/xpointer.h +137 -0
  51. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFArray.h +673 -0
  52. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFAttributedString.h +157 -0
  53. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFAttributedStringPriv.h +25 -0
  54. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFAvailability.h +236 -0
  55. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFBag.h +97 -0
  56. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFBase.h +702 -0
  57. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFBigNumber.h +76 -0
  58. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFBinaryHeap.h +294 -0
  59. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFBitVector.h +49 -0
  60. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFBundle.h +349 -0
  61. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFBundlePriv.h +334 -0
  62. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFBundle_BinaryTypes.h +61 -0
  63. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFBurstTrie.h +181 -0
  64. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFByteOrder.h +305 -0
  65. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFCalendar.h +116 -0
  66. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFCalendarPriv.h +52 -0
  67. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFCharacterSet.h +387 -0
  68. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFCharacterSetPriv.h +78 -0
  69. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFConstantKeys.h +128 -0
  70. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFData.h +79 -0
  71. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFDate.h +113 -0
  72. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFDateComponents.h +92 -0
  73. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFDateFormatter.h +193 -0
  74. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFDateFormatter_Private.h +31 -0
  75. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFDateInterval.h +62 -0
  76. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFDateIntervalFormatter.h +96 -0
  77. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFDictionary.h +674 -0
  78. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFError.h +183 -0
  79. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFError_Private.h +27 -0
  80. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFKnownLocations.h +42 -0
  81. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFListFormatter.h +32 -0
  82. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFLocale.h +204 -0
  83. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFLocale_Private.h +35 -0
  84. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFLocking.h +124 -0
  85. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFLogUtilities.h +52 -0
  86. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFMachPort.h +53 -0
  87. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFMessagePort.h +66 -0
  88. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFNotificationCenter.h +81 -0
  89. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFNumber.h +129 -0
  90. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFNumberFormatter.h +174 -0
  91. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFNumber_Private.h +30 -0
  92. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFOverflow.h +88 -0
  93. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFPlugIn.h +124 -0
  94. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFPlugInCOM.h +117 -0
  95. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFPreferences.h +130 -0
  96. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFPriv.h +721 -0
  97. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFPropertyList.h +151 -0
  98. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFPropertyList_Private.h +19 -0
  99. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFRegularExpression.h +68 -0
  100. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFRelativeDateTimeFormatter.h +61 -0
  101. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFRunArray.h +57 -0
  102. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFRunLoop.h +203 -0
  103. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFRuntime.h +281 -0
  104. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFSet.h +491 -0
  105. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFSocket.h +220 -0
  106. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFStorage.h +296 -0
  107. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFStream.h +505 -0
  108. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFStreamAbstract.h +181 -0
  109. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFStreamPriv.h +126 -0
  110. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFString.h +915 -0
  111. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFStringDefaultEncoding.h +45 -0
  112. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFStringEncodingConverter.h +82 -0
  113. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFStringEncodingConverterExt.h +121 -0
  114. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFStringEncodingConverterPriv.h +47 -0
  115. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFStringEncodingDatabase.h +23 -0
  116. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFStringEncodingExt.h +184 -0
  117. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFString_Private.h +32 -0
  118. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFTargetConditionals.h +284 -0
  119. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFTimeZone.h +98 -0
  120. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFTree.h +330 -0
  121. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFURL.h +1256 -0
  122. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFURLAccess.h +128 -0
  123. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFURLComponents.h +123 -0
  124. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFURLPriv.h +879 -0
  125. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFUUID.h +78 -0
  126. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFUniChar.h +244 -0
  127. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFUnicodeDecomposition.h +35 -0
  128. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFUnicodePrecomposition.h +23 -0
  129. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFUserNotification.h +185 -0
  130. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CFUtilities.h +27 -0
  131. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/CoreFoundation.h +105 -0
  132. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/ForFoundationOnly.h +816 -0
  133. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/ForSwiftFoundationOnly.h +689 -0
  134. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/module.modulemap +8 -0
  135. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/CoreFoundation/static-module.map +7 -0
  136. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_FoundationCShims/CFUniCharBitmapData.h +17 -0
  137. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_FoundationCShims/CFUniCharBitmapData.inc.h +14707 -0
  138. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_FoundationCShims/CFUniCharBitmapDataAccess.h +16 -0
  139. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_FoundationCShims/_CShimsMacros.h +24 -0
  140. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_FoundationCShims/_CShimsTargetConditionals.h +56 -0
  141. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_FoundationCShims/_CStdlib.h +169 -0
  142. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_FoundationCShims/_FoundationCShims.h +32 -0
  143. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_FoundationCShims/bplist_shims.h +19 -0
  144. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_FoundationCShims/filemanager_shims.h +156 -0
  145. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_FoundationCShims/io_shims.h +89 -0
  146. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_FoundationCShims/module.modulemap +5 -0
  147. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_FoundationCShims/platform_shims.h +112 -0
  148. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_FoundationCShims/string_shims.h +52 -0
  149. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_FoundationCShims/uuid.h +81 -0
  150. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/alphaindex.h +766 -0
  151. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/appendable.h +239 -0
  152. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/basictz.h +248 -0
  153. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/brkiter.h +694 -0
  154. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/bytestream.h +307 -0
  155. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/bytestrie.h +568 -0
  156. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/bytestriebuilder.h +193 -0
  157. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/calendar.h +2609 -0
  158. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/caniter.h +215 -0
  159. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/casemap.h +497 -0
  160. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/char16ptr.h +384 -0
  161. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/chariter.h +734 -0
  162. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/choicfmt.h +601 -0
  163. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/coleitr.h +411 -0
  164. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/coll.h +1387 -0
  165. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/compactdecimalformat.h +196 -0
  166. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/curramt.h +133 -0
  167. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/currpinf.h +274 -0
  168. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/currunit.h +146 -0
  169. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/datefmt.h +968 -0
  170. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/dbbi.h +48 -0
  171. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/dcfmtsym.h +636 -0
  172. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/decimfmt.h +2233 -0
  173. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/displayoptions.h +270 -0
  174. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/docmain.h +247 -0
  175. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/dtfmtsym.h +1055 -0
  176. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/dtintrv.h +163 -0
  177. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/dtitvfmt.h +1231 -0
  178. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/dtitvinf.h +524 -0
  179. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/dtptngen.h +676 -0
  180. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/dtrule.h +256 -0
  181. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/edits.h +531 -0
  182. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/enumset.h +69 -0
  183. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/errorcode.h +144 -0
  184. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/fieldpos.h +298 -0
  185. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/filteredbrk.h +152 -0
  186. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/fmtable.h +758 -0
  187. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/format.h +316 -0
  188. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/formattednumber.h +215 -0
  189. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/formattedvalue.h +318 -0
  190. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/fpositer.h +124 -0
  191. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/gender.h +122 -0
  192. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/gregocal.h +737 -0
  193. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/icudataver.h +43 -0
  194. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/icuplug.h +391 -0
  195. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/idna.h +333 -0
  196. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/listformatter.h +291 -0
  197. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/localebuilder.h +309 -0
  198. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/localematcher.h +710 -0
  199. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/localpointer.h +609 -0
  200. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/locdspnm.h +211 -0
  201. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/locid.h +1293 -0
  202. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/measfmt.h +501 -0
  203. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/measunit.h +3928 -0
  204. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/measure.h +174 -0
  205. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/messagepattern.h +950 -0
  206. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/module.modulemap +209 -0
  207. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/msgfmt.h +1117 -0
  208. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/normalizer2.h +791 -0
  209. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/normlzr.h +816 -0
  210. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/nounit.h +86 -0
  211. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/numberformatter.h +2862 -0
  212. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/numberrangeformatter.h +802 -0
  213. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/numfmt.h +1299 -0
  214. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/numsys.h +220 -0
  215. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/parseerr.h +94 -0
  216. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/parsepos.h +237 -0
  217. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/platform.h +874 -0
  218. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/plurfmt.h +601 -0
  219. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/plurrule.h +591 -0
  220. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ptypes.h +66 -0
  221. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/putil.h +183 -0
  222. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/rbbi.h +902 -0
  223. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/rbnf.h +1153 -0
  224. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/rbtz.h +373 -0
  225. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/regex.h +1882 -0
  226. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/region.h +229 -0
  227. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/reldatefmt.h +758 -0
  228. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/rep.h +266 -0
  229. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/resbund.h +489 -0
  230. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/schriter.h +187 -0
  231. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/scientificnumberformatter.h +222 -0
  232. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/search.h +580 -0
  233. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/selfmt.h +374 -0
  234. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/simpleformatter.h +414 -0
  235. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/simplenumberformatter.h +326 -0
  236. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/simpletz.h +940 -0
  237. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/smpdtfmt.h +1383 -0
  238. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/sortkey.h +344 -0
  239. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/std_string.h +41 -0
  240. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/strenum.h +281 -0
  241. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/stringoptions.h +190 -0
  242. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/stringpiece.h +354 -0
  243. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/stringtriebuilder.h +426 -0
  244. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/stsearch.h +509 -0
  245. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/symtable.h +119 -0
  246. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/tblcoll.h +886 -0
  247. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/timezone.h +1067 -0
  248. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/tmunit.h +142 -0
  249. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/tmutamt.h +174 -0
  250. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/tmutfmt.h +238 -0
  251. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/translit.h +1593 -0
  252. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/tzfmt.h +1102 -0
  253. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/tznames.h +419 -0
  254. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/tzrule.h +820 -0
  255. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/tztrans.h +201 -0
  256. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ualoc.h +372 -0
  257. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uameasureformat.h +487 -0
  258. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uameasureunit.h +249 -0
  259. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uatimeunitformat.h +377 -0
  260. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uatimezone.h +114 -0
  261. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ubidi.h +2368 -0
  262. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ubiditransform.h +326 -0
  263. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ubrk.h +684 -0
  264. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucal.h +1825 -0
  265. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucasemap.h +388 -0
  266. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucat.h +160 -0
  267. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uchar.h +4410 -0
  268. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucharstrie.h +623 -0
  269. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucharstriebuilder.h +193 -0
  270. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uchriter.h +393 -0
  271. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uclean.h +262 -0
  272. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucnv.h +2053 -0
  273. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucnv_cb.h +164 -0
  274. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucnv_err.h +465 -0
  275. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucnvsel.h +193 -0
  276. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucol.h +1649 -0
  277. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucoleitr.h +344 -0
  278. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uconfig.h +501 -0
  279. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucpmap.h +158 -0
  280. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucptrie.h +645 -0
  281. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucsdet.h +426 -0
  282. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ucurr.h +466 -0
  283. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/udat.h +1767 -0
  284. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/udata.h +454 -0
  285. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/udateintervalformat.h +458 -0
  286. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/udatintv.h +146 -0
  287. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/udatpg.h +806 -0
  288. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/udisplaycontext.h +233 -0
  289. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/udisplayoptions.h +321 -0
  290. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uenum.h +209 -0
  291. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ufieldpositer.h +123 -0
  292. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uformattable.h +290 -0
  293. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uformattednumber.h +224 -0
  294. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uformattedvalue.h +445 -0
  295. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ugender.h +86 -0
  296. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uidna.h +794 -0
  297. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uiter.h +709 -0
  298. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uldnames.h +307 -0
  299. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ulistformatter.h +333 -0
  300. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uloc.h +1437 -0
  301. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ulocale.h +226 -0
  302. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ulocbuilder.h +437 -0
  303. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ulocdata.h +299 -0
  304. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/umachine.h +491 -0
  305. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/umisc.h +62 -0
  306. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/umsg.h +628 -0
  307. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/umutablecptrie.h +240 -0
  308. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/unifilt.h +136 -0
  309. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/unifunct.h +132 -0
  310. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/unimatch.h +168 -0
  311. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/unirepl.h +103 -0
  312. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uniset.h +1909 -0
  313. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/unistr.h +5095 -0
  314. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/unorm.h +476 -0
  315. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/unorm2.h +626 -0
  316. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/unum.h +1524 -0
  317. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/unumberformatter.h +576 -0
  318. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/unumberoptions.h +173 -0
  319. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/unumberrangeformatter.h +471 -0
  320. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/unumsys.h +176 -0
  321. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uobject.h +324 -0
  322. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uplrule.h +82 -0
  323. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/upluralrules.h +263 -0
  324. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/urbtok.h +276 -0
  325. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uregex.h +1617 -0
  326. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uregion.h +252 -0
  327. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ureldatefmt.h +510 -0
  328. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/urename.h +4026 -0
  329. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/urep.h +157 -0
  330. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ures.h +912 -0
  331. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uscript.h +742 -0
  332. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/usearch.h +911 -0
  333. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uset.h +1898 -0
  334. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/usetiter.h +323 -0
  335. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ushape.h +476 -0
  336. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/usimplenumberformatter.h +297 -0
  337. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uspoof.h +1852 -0
  338. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/usprep.h +274 -0
  339. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ustdio.h +1021 -0
  340. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ustream.h +69 -0
  341. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ustring.h +1719 -0
  342. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/ustringtrie.h +97 -0
  343. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/utext.h +1613 -0
  344. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/utf.h +225 -0
  345. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/utf16.h +740 -0
  346. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/utf32.h +25 -0
  347. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/utf8.h +882 -0
  348. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/utf_old.h +1207 -0
  349. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/utmscale.h +490 -0
  350. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/utrace.h +506 -0
  351. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/utrans.h +660 -0
  352. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/utypes.h +826 -0
  353. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uvernum.h +191 -0
  354. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/uversion.h +230 -0
  355. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/_foundation_unicode/vtzone.h +471 -0
  356. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/wasi/Foundation.swiftmodule/wasm32-unknown-wasip1.swiftmodule +0 -0
  357. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/wasi/FoundationEssentials.swiftmodule/wasm32-unknown-wasip1.swiftmodule +0 -0
  358. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/wasi/FoundationInternationalization.swiftmodule/wasm32-unknown-wasip1.swiftmodule +0 -0
  359. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/wasi/FoundationXML.swiftmodule/wasm32-unknown-wasip1.swiftmodule +0 -0
  360. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/wasi/_FoundationCollections.swiftmodule/wasm32-unknown-wasip1.swiftmodule +0 -0
  361. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/wasi/libCoreFoundation.a +0 -0
  362. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/wasi/libFoundation.a +0 -0
  363. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/wasi/libFoundationEssentials.a +0 -0
  364. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/wasi/libFoundationInternationalization.a +0 -0
  365. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/wasi/libFoundationXML.a +0 -0
  366. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/wasi/lib_CFXMLInterface.a +0 -0
  367. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/wasi/lib_FoundationCShims.a +0 -0
  368. package/wasm32-unknown-wasip1/swift.xctoolchain/usr/lib/swift_static/wasi/lib_FoundationCollections.a +0 -0
@@ -0,0 +1,2233 @@
1
+ // © 2016 and later: Unicode, Inc. and others.
2
+ // License & terms of use: http://www.unicode.org/copyright.html
3
+ /*
4
+ ********************************************************************************
5
+ * Copyright (C) 1997-2016, International Business Machines
6
+ * Corporation and others. All Rights Reserved.
7
+ ********************************************************************************
8
+ *
9
+ * File DECIMFMT.H
10
+ *
11
+ * Modification History:
12
+ *
13
+ * Date Name Description
14
+ * 02/19/97 aliu Converted from java.
15
+ * 03/20/97 clhuang Updated per C++ implementation.
16
+ * 04/03/97 aliu Rewrote parsing and formatting completely, and
17
+ * cleaned up and debugged. Actually works now.
18
+ * 04/17/97 aliu Changed DigitCount to int per code review.
19
+ * 07/10/97 helena Made ParsePosition a class and get rid of the function
20
+ * hiding problems.
21
+ * 09/09/97 aliu Ported over support for exponential formats.
22
+ * 07/20/98 stephen Changed documentation
23
+ * 01/30/13 emmons Added Scaling methods
24
+ ********************************************************************************
25
+ */
26
+
27
+ #ifndef DECIMFMT_H
28
+ #define DECIMFMT_H
29
+
30
+ #include <_foundation_unicode/utypes.h>
31
+
32
+ #if U_SHOW_CPLUSPLUS_API
33
+
34
+ /**
35
+ * \file
36
+ * \brief C++ API: Compatibility APIs for decimal formatting.
37
+ */
38
+
39
+ #if !UCONFIG_NO_FORMATTING
40
+
41
+ #include <_foundation_unicode/dcfmtsym.h>
42
+ #include <_foundation_unicode/numfmt.h>
43
+ #include <_foundation_unicode/locid.h>
44
+ #include <_foundation_unicode/fpositer.h>
45
+ #include <_foundation_unicode/stringpiece.h>
46
+ #include <_foundation_unicode/curramt.h>
47
+ #include <_foundation_unicode/enumset.h>
48
+
49
+ U_NAMESPACE_BEGIN
50
+
51
+ class CurrencyPluralInfo;
52
+ class CompactDecimalFormat;
53
+
54
+ namespace number {
55
+ class LocalizedNumberFormatter;
56
+ namespace impl {
57
+ class DecimalQuantity;
58
+ struct DecimalFormatFields;
59
+ class UFormattedNumberData;
60
+ }
61
+ }
62
+
63
+ namespace numparse::impl {
64
+ class NumberParserImpl;
65
+ }
66
+
67
+ /**
68
+ * **IMPORTANT:** New users are strongly encouraged to see if
69
+ * numberformatter.h fits their use case. Although not deprecated, this header
70
+ * is provided for backwards compatibility only.
71
+ *
72
+ * DecimalFormat is a concrete subclass of NumberFormat that formats decimal
73
+ * numbers. It has a variety of features designed to make it possible to parse
74
+ * and format numbers in any locale, including support for Western, Arabic, or
75
+ * Indic digits. It also supports different flavors of numbers, including
76
+ * integers ("123"), fixed-point numbers ("123.4"), scientific notation
77
+ * ("1.23E4"), percentages ("12%"), and currency amounts ("$123", "USD123",
78
+ * "123 US dollars"). All of these flavors can be easily localized.
79
+ *
80
+ * To obtain a NumberFormat for a specific locale (including the default
81
+ * locale) call one of NumberFormat's factory methods such as
82
+ * createInstance(). Do not call the DecimalFormat constructors directly, unless
83
+ * you know what you are doing, since the NumberFormat factory methods may
84
+ * return subclasses other than DecimalFormat.
85
+ *
86
+ * **Example Usage**
87
+ *
88
+ * \code
89
+ * // Normally we would have a GUI with a menu for this
90
+ * int32_t locCount;
91
+ * const Locale* locales = NumberFormat::getAvailableLocales(locCount);
92
+ *
93
+ * double myNumber = -1234.56;
94
+ * UErrorCode success = U_ZERO_ERROR;
95
+ * NumberFormat* form;
96
+ *
97
+ * // Print out a number with the localized number, currency and percent
98
+ * // format for each locale.
99
+ * UnicodeString countryName;
100
+ * UnicodeString displayName;
101
+ * UnicodeString str;
102
+ * UnicodeString pattern;
103
+ * Formattable fmtable;
104
+ * for (int32_t j = 0; j < 3; ++j) {
105
+ * cout << endl << "FORMAT " << j << endl;
106
+ * for (int32_t i = 0; i < locCount; ++i) {
107
+ * if (locales[i].getCountry(countryName).size() == 0) {
108
+ * // skip language-only
109
+ * continue;
110
+ * }
111
+ * switch (j) {
112
+ * case 0:
113
+ * form = NumberFormat::createInstance(locales[i], success ); break;
114
+ * case 1:
115
+ * form = NumberFormat::createCurrencyInstance(locales[i], success ); break;
116
+ * default:
117
+ * form = NumberFormat::createPercentInstance(locales[i], success ); break;
118
+ * }
119
+ * if (form) {
120
+ * str.remove();
121
+ * pattern = ((DecimalFormat*)form)->toPattern(pattern);
122
+ * cout << locales[i].getDisplayName(displayName) << ": " << pattern;
123
+ * cout << " -> " << form->format(myNumber,str) << endl;
124
+ * form->parse(form->format(myNumber,str), fmtable, success);
125
+ * delete form;
126
+ * }
127
+ * }
128
+ * }
129
+ * \endcode
130
+ *
131
+ * **Another example use createInstance(style)**
132
+ *
133
+ * \code
134
+ * // Print out a number using the localized number, currency,
135
+ * // percent, scientific, integer, iso currency, and plural currency
136
+ * // format for each locale</strong>
137
+ * Locale* locale = new Locale("en", "US");
138
+ * double myNumber = 1234.56;
139
+ * UErrorCode success = U_ZERO_ERROR;
140
+ * UnicodeString str;
141
+ * Formattable fmtable;
142
+ * for (int j=NumberFormat::kNumberStyle;
143
+ * j<=NumberFormat::kPluralCurrencyStyle;
144
+ * ++j) {
145
+ * NumberFormat* form = NumberFormat::createInstance(locale, j, success);
146
+ * str.remove();
147
+ * cout << "format result " << form->format(myNumber, str) << endl;
148
+ * format->parse(form->format(myNumber, str), fmtable, success);
149
+ * delete form;
150
+ * }
151
+ * \endcode
152
+ *
153
+ *
154
+ * <p><strong>Patterns</strong>
155
+ *
156
+ * <p>A DecimalFormat consists of a <em>pattern</em> and a set of
157
+ * <em>symbols</em>. The pattern may be set directly using
158
+ * applyPattern(), or indirectly using other API methods which
159
+ * manipulate aspects of the pattern, such as the minimum number of integer
160
+ * digits. The symbols are stored in a DecimalFormatSymbols
161
+ * object. When using the NumberFormat factory methods, the
162
+ * pattern and symbols are read from ICU's locale data.
163
+ *
164
+ * <p><strong>Special Pattern Characters</strong>
165
+ *
166
+ * <p>Many characters in a pattern are taken literally; they are matched during
167
+ * parsing and output unchanged during formatting. Special characters, on the
168
+ * other hand, stand for other characters, strings, or classes of characters.
169
+ * For example, the '#' character is replaced by a localized digit. Often the
170
+ * replacement character is the same as the pattern character; in the U.S. locale,
171
+ * the ',' grouping character is replaced by ','. However, the replacement is
172
+ * still happening, and if the symbols are modified, the grouping character
173
+ * changes. Some special characters affect the behavior of the formatter by
174
+ * their presence; for example, if the percent character is seen, then the
175
+ * value is multiplied by 100 before being displayed.
176
+ *
177
+ * <p>To insert a special character in a pattern as a literal, that is, without
178
+ * any special meaning, the character must be quoted. There are some exceptions to
179
+ * this which are noted below.
180
+ *
181
+ * <p>The characters listed here are used in non-localized patterns. Localized
182
+ * patterns use the corresponding characters taken from this formatter's
183
+ * DecimalFormatSymbols object instead, and these characters lose
184
+ * their special status. Two exceptions are the currency sign and quote, which
185
+ * are not localized.
186
+ *
187
+ * <table border=0 cellspacing=3 cellpadding=0>
188
+ * <tr bgcolor="#ccccff">
189
+ * <td align=left><strong>Symbol</strong>
190
+ * <td align=left><strong>Location</strong>
191
+ * <td align=left><strong>Localized?</strong>
192
+ * <td align=left><strong>Meaning</strong>
193
+ * <tr valign=top>
194
+ * <td><code>0</code>
195
+ * <td>Number
196
+ * <td>Yes
197
+ * <td>Digit
198
+ * <tr valign=top bgcolor="#eeeeff">
199
+ * <td><code>1-9</code>
200
+ * <td>Number
201
+ * <td>Yes
202
+ * <td>'1' through '9' indicate rounding.
203
+ * <tr valign=top>
204
+ * <td><code>\htmlonly&#x40;\endhtmlonly</code> <!--doxygen doesn't like @-->
205
+ * <td>Number
206
+ * <td>No
207
+ * <td>Significant digit
208
+ * <tr valign=top bgcolor="#eeeeff">
209
+ * <td><code>#</code>
210
+ * <td>Number
211
+ * <td>Yes
212
+ * <td>Digit, zero shows as absent
213
+ * <tr valign=top>
214
+ * <td><code>.</code>
215
+ * <td>Number
216
+ * <td>Yes
217
+ * <td>Decimal separator or monetary decimal separator
218
+ * <tr valign=top bgcolor="#eeeeff">
219
+ * <td><code>-</code>
220
+ * <td>Number
221
+ * <td>Yes
222
+ * <td>Minus sign
223
+ * <tr valign=top>
224
+ * <td><code>,</code>
225
+ * <td>Number
226
+ * <td>Yes
227
+ * <td>Grouping separator
228
+ * <tr valign=top bgcolor="#eeeeff">
229
+ * <td><code>E</code>
230
+ * <td>Number
231
+ * <td>Yes
232
+ * <td>Separates mantissa and exponent in scientific notation.
233
+ * <em>Need not be quoted in prefix or suffix.</em>
234
+ * <tr valign=top>
235
+ * <td><code>+</code>
236
+ * <td>Exponent
237
+ * <td>Yes
238
+ * <td>Prefix positive exponents with localized plus sign.
239
+ * <em>Need not be quoted in prefix or suffix.</em>
240
+ * <tr valign=top bgcolor="#eeeeff">
241
+ * <td><code>;</code>
242
+ * <td>Subpattern boundary
243
+ * <td>Yes
244
+ * <td>Separates positive and negative subpatterns
245
+ * <tr valign=top>
246
+ * <td><code>\%</code>
247
+ * <td>Prefix or suffix
248
+ * <td>Yes
249
+ * <td>Multiply by 100 and show as percentage
250
+ * <tr valign=top bgcolor="#eeeeff">
251
+ * <td><code>\\u2030</code>
252
+ * <td>Prefix or suffix
253
+ * <td>Yes
254
+ * <td>Multiply by 1000 and show as per mille
255
+ * <tr valign=top>
256
+ * <td><code>\htmlonly&curren;\endhtmlonly</code> (<code>\\u00A4</code>)
257
+ * <td>Prefix or suffix
258
+ * <td>No
259
+ * <td>Currency sign, replaced by currency symbol. If
260
+ * doubled, replaced by international currency symbol.
261
+ * If tripled, replaced by currency plural names, for example,
262
+ * "US dollar" or "US dollars" for America.
263
+ * If present in a pattern, the monetary decimal separator
264
+ * is used instead of the decimal separator.
265
+ * <tr valign=top bgcolor="#eeeeff">
266
+ * <td><code>'</code>
267
+ * <td>Prefix or suffix
268
+ * <td>No
269
+ * <td>Used to quote special characters in a prefix or suffix,
270
+ * for example, <code>"'#'#"</code> formats 123 to
271
+ * <code>"#123"</code>. To create a single quote
272
+ * itself, use two in a row: <code>"# o''clock"</code>.
273
+ * <tr valign=top>
274
+ * <td><code>*</code>
275
+ * <td>Prefix or suffix boundary
276
+ * <td>Yes
277
+ * <td>Pad escape, precedes pad character
278
+ * </table>
279
+ *
280
+ * <p>A DecimalFormat pattern contains a positive and negative
281
+ * subpattern, for example, "#,##0.00;(#,##0.00)". Each subpattern has a
282
+ * prefix, a numeric part, and a suffix. If there is no explicit negative
283
+ * subpattern, the negative subpattern is the localized minus sign prefixed to the
284
+ * positive subpattern. That is, "0.00" alone is equivalent to "0.00;-0.00". If there
285
+ * is an explicit negative subpattern, it serves only to specify the negative
286
+ * prefix and suffix; the number of digits, minimal digits, and other
287
+ * characteristics are ignored in the negative subpattern. That means that
288
+ * "#,##0.0#;(#)" has precisely the same result as "#,##0.0#;(#,##0.0#)".
289
+ *
290
+ * <p>The prefixes, suffixes, and various symbols used for infinity, digits,
291
+ * thousands separators, decimal separators, etc. may be set to arbitrary
292
+ * values, and they will appear properly during formatting. However, care must
293
+ * be taken that the symbols and strings do not conflict, or parsing will be
294
+ * unreliable. For example, either the positive and negative prefixes or the
295
+ * suffixes must be distinct for parse() to be able
296
+ * to distinguish positive from negative values. Another example is that the
297
+ * decimal separator and thousands separator should be distinct characters, or
298
+ * parsing will be impossible.
299
+ *
300
+ * <p>The <em>grouping separator</em> is a character that separates clusters of
301
+ * integer digits to make large numbers more legible. It commonly used for
302
+ * thousands, but in some locales it separates ten-thousands. The <em>grouping
303
+ * size</em> is the number of digits between the grouping separators, such as 3
304
+ * for "100,000,000" or 4 for "1 0000 0000". There are actually two different
305
+ * grouping sizes: One used for the least significant integer digits, the
306
+ * <em>primary grouping size</em>, and one used for all others, the
307
+ * <em>secondary grouping size</em>. In most locales these are the same, but
308
+ * sometimes they are different. For example, if the primary grouping interval
309
+ * is 3, and the secondary is 2, then this corresponds to the pattern
310
+ * "#,##,##0", and the number 123456789 is formatted as "12,34,56,789". If a
311
+ * pattern contains multiple grouping separators, the interval between the last
312
+ * one and the end of the integer defines the primary grouping size, and the
313
+ * interval between the last two defines the secondary grouping size. All others
314
+ * are ignored, so "#,##,###,####" == "###,###,####" == "##,#,###,####".
315
+ *
316
+ * <p>Illegal patterns, such as "#.#.#" or "#.###,###", will cause
317
+ * DecimalFormat to set a failing UErrorCode.
318
+ *
319
+ * <p><strong>Pattern BNF</strong>
320
+ *
321
+ * <pre>
322
+ * pattern := subpattern (';' subpattern)?
323
+ * subpattern := prefix? number exponent? suffix?
324
+ * number := (integer ('.' fraction)?) | sigDigits
325
+ * prefix := '\\u0000'..'\\uFFFD' - specialCharacters
326
+ * suffix := '\\u0000'..'\\uFFFD' - specialCharacters
327
+ * integer := '#'* '0'* '0'
328
+ * fraction := '0'* '#'*
329
+ * sigDigits := '#'* '@' '@'* '#'*
330
+ * exponent := 'E' '+'? '0'* '0'
331
+ * padSpec := '*' padChar
332
+ * padChar := '\\u0000'..'\\uFFFD' - quote
333
+ * &nbsp;
334
+ * Notation:
335
+ * X* 0 or more instances of X
336
+ * X? 0 or 1 instances of X
337
+ * X|Y either X or Y
338
+ * C..D any character from C up to D, inclusive
339
+ * S-T characters in S, except those in T
340
+ * </pre>
341
+ * The first subpattern is for positive numbers. The second (optional)
342
+ * subpattern is for negative numbers.
343
+ *
344
+ * <p>Not indicated in the BNF syntax above:
345
+ *
346
+ * <ul><li>The grouping separator ',' can occur inside the integer and
347
+ * sigDigits elements, between any two pattern characters of that
348
+ * element, as long as the integer or sigDigits element is not
349
+ * followed by the exponent element.
350
+ *
351
+ * <li>Two grouping intervals are recognized: That between the
352
+ * decimal point and the first grouping symbol, and that
353
+ * between the first and second grouping symbols. These
354
+ * intervals are identical in most locales, but in some
355
+ * locales they differ. For example, the pattern
356
+ * &quot;#,##,###&quot; formats the number 123456789 as
357
+ * &quot;12,34,56,789&quot;.</li>
358
+ *
359
+ * <li>The pad specifier <code>padSpec</code> may appear before the prefix,
360
+ * after the prefix, before the suffix, after the suffix, or not at all.
361
+ *
362
+ * <li>In place of '0', the digits '1' through '9' may be used to
363
+ * indicate a rounding increment.
364
+ * </ul>
365
+ *
366
+ * <p><strong>Parsing</strong>
367
+ *
368
+ * <p>DecimalFormat parses all Unicode characters that represent
369
+ * decimal digits, as defined by u_charDigitValue(). In addition,
370
+ * DecimalFormat also recognizes as digits the ten consecutive
371
+ * characters starting with the localized zero digit defined in the
372
+ * DecimalFormatSymbols object. During formatting, the
373
+ * DecimalFormatSymbols-based digits are output.
374
+ *
375
+ * <p>During parsing, grouping separators are ignored if in lenient mode;
376
+ * otherwise, if present, they must be in appropriate positions.
377
+ * (For Apple ICU, it is just: During parsing, grouping separators are ignored.)
378
+ *
379
+ * <p>For currency parsing, the formatter is able to parse every currency
380
+ * style formats no matter which style the formatter is constructed with.
381
+ * For example, a formatter instance gotten from
382
+ * NumberFormat.getInstance(ULocale, NumberFormat.CURRENCYSTYLE) can parse
383
+ * formats such as "USD1.00" and "3.00 US dollars".
384
+ *
385
+ * <p>If parse(UnicodeString&,Formattable&,ParsePosition&)
386
+ * fails to parse a string, it leaves the parse position unchanged.
387
+ * The convenience method parse(UnicodeString&,Formattable&,UErrorCode&)
388
+ * indicates parse failure by setting a failing
389
+ * UErrorCode.
390
+ *
391
+ * <p><strong>Formatting</strong>
392
+ *
393
+ * <p>Formatting is guided by several parameters, all of which can be
394
+ * specified either using a pattern or using the API. The following
395
+ * description applies to formats that do not use <a href="#sci">scientific
396
+ * notation</a> or <a href="#sigdig">significant digits</a>.
397
+ *
398
+ * <ul><li>If the number of actual integer digits exceeds the
399
+ * <em>maximum integer digits</em>, then only the least significant
400
+ * digits are shown. For example, 1997 is formatted as "97" if the
401
+ * maximum integer digits is set to 2.
402
+ *
403
+ * <li>If the number of actual integer digits is less than the
404
+ * <em>minimum integer digits</em>, then leading zeros are added. For
405
+ * example, 1997 is formatted as "01997" if the minimum integer digits
406
+ * is set to 5.
407
+ *
408
+ * <li>If the number of actual fraction digits exceeds the <em>maximum
409
+ * fraction digits</em>, then rounding is performed to the
410
+ * maximum fraction digits. For example, 0.125 is formatted as "0.12"
411
+ * if the maximum fraction digits is 2. This behavior can be changed
412
+ * by specifying a rounding increment and/or a rounding mode.
413
+ *
414
+ * <li>If the number of actual fraction digits is less than the
415
+ * <em>minimum fraction digits</em>, then trailing zeros are added.
416
+ * For example, 0.125 is formatted as "0.1250" if the minimum fraction
417
+ * digits is set to 4.
418
+ *
419
+ * <li>Trailing fractional zeros are not displayed if they occur
420
+ * <em>j</em> positions after the decimal, where <em>j</em> is less
421
+ * than the maximum fraction digits. For example, 0.10004 is
422
+ * formatted as "0.1" if the maximum fraction digits is four or less.
423
+ * </ul>
424
+ *
425
+ * <p><strong>Special Values</strong>
426
+ *
427
+ * <p><code>NaN</code> is represented as a single character, typically
428
+ * <code>\\uFFFD</code>. This character is determined by the
429
+ * DecimalFormatSymbols object. This is the only value for which
430
+ * the prefixes and suffixes are not used.
431
+ *
432
+ * <p>Infinity is represented as a single character, typically
433
+ * <code>\\u221E</code>, with the positive or negative prefixes and suffixes
434
+ * applied. The infinity character is determined by the
435
+ * DecimalFormatSymbols object.
436
+ *
437
+ * <a name="sci"><strong>Scientific Notation</strong></a>
438
+ *
439
+ * <p>Numbers in scientific notation are expressed as the product of a mantissa
440
+ * and a power of ten, for example, 1234 can be expressed as 1.234 x 10<sup>3</sup>. The
441
+ * mantissa is typically in the half-open interval [1.0, 10.0) or sometimes [0.0, 1.0),
442
+ * but it need not be. DecimalFormat supports arbitrary mantissas.
443
+ * DecimalFormat can be instructed to use scientific
444
+ * notation through the API or through the pattern. In a pattern, the exponent
445
+ * character immediately followed by one or more digit characters indicates
446
+ * scientific notation. Example: "0.###E0" formats the number 1234 as
447
+ * "1.234E3".
448
+ *
449
+ * <ul>
450
+ * <li>The number of digit characters after the exponent character gives the
451
+ * minimum exponent digit count. There is no maximum. Negative exponents are
452
+ * formatted using the localized minus sign, <em>not</em> the prefix and suffix
453
+ * from the pattern. This allows patterns such as "0.###E0 m/s". To prefix
454
+ * positive exponents with a localized plus sign, specify '+' between the
455
+ * exponent and the digits: "0.###E+0" will produce formats "1E+1", "1E+0",
456
+ * "1E-1", etc. (In localized patterns, use the localized plus sign rather than
457
+ * '+'.)
458
+ *
459
+ * <li>The minimum number of integer digits is achieved by adjusting the
460
+ * exponent. Example: 0.00123 formatted with "00.###E0" yields "12.3E-4". This
461
+ * only happens if there is no maximum number of integer digits. If there is a
462
+ * maximum, then the minimum number of integer digits is fixed at one.
463
+ *
464
+ * <li>The maximum number of integer digits, if present, specifies the exponent
465
+ * grouping. The most common use of this is to generate <em>engineering
466
+ * notation</em>, in which the exponent is a multiple of three, e.g.,
467
+ * "##0.###E0". The number 12345 is formatted using "##0.####E0" as "12.345E3".
468
+ *
469
+ * <li>When using scientific notation, the formatter controls the
470
+ * digit counts using significant digits logic. The maximum number of
471
+ * significant digits limits the total number of integer and fraction
472
+ * digits that will be shown in the mantissa; it does not affect
473
+ * parsing. For example, 12345 formatted with "##0.##E0" is "12.3E3".
474
+ * See the section on significant digits for more details.
475
+ *
476
+ * <li>The number of significant digits shown is determined as
477
+ * follows: If areSignificantDigitsUsed() returns false, then the
478
+ * minimum number of significant digits shown is one, and the maximum
479
+ * number of significant digits shown is the sum of the <em>minimum
480
+ * integer</em> and <em>maximum fraction</em> digits, and is
481
+ * unaffected by the maximum integer digits. If this sum is zero,
482
+ * then all significant digits are shown. If
483
+ * areSignificantDigitsUsed() returns true, then the significant digit
484
+ * counts are specified by getMinimumSignificantDigits() and
485
+ * getMaximumSignificantDigits(). In this case, the number of
486
+ * integer digits is fixed at one, and there is no exponent grouping.
487
+ *
488
+ * <li>Exponential patterns may not contain grouping separators.
489
+ * </ul>
490
+ *
491
+ * <a name="sigdig"><strong>Significant Digits</strong></a>
492
+ *
493
+ * <code>DecimalFormat</code> has two ways of controlling how many
494
+ * digits are shows: (a) significant digits counts, or (b) integer and
495
+ * fraction digit counts. Integer and fraction digit counts are
496
+ * described above. When a formatter is using significant digits
497
+ * counts, the number of integer and fraction digits is not specified
498
+ * directly, and the formatter settings for these counts are ignored.
499
+ * Instead, the formatter uses however many integer and fraction
500
+ * digits are required to display the specified number of significant
501
+ * digits. Examples:
502
+ *
503
+ * <table border=0 cellspacing=3 cellpadding=0>
504
+ * <tr bgcolor="#ccccff">
505
+ * <td align=left>Pattern
506
+ * <td align=left>Minimum significant digits
507
+ * <td align=left>Maximum significant digits
508
+ * <td align=left>Number
509
+ * <td align=left>Output of format()
510
+ * <tr valign=top>
511
+ * <td><code>\@\@\@</code>
512
+ * <td>3
513
+ * <td>3
514
+ * <td>12345
515
+ * <td><code>12300</code>
516
+ * <tr valign=top bgcolor="#eeeeff">
517
+ * <td><code>\@\@\@</code>
518
+ * <td>3
519
+ * <td>3
520
+ * <td>0.12345
521
+ * <td><code>0.123</code>
522
+ * <tr valign=top>
523
+ * <td><code>\@\@##</code>
524
+ * <td>2
525
+ * <td>4
526
+ * <td>3.14159
527
+ * <td><code>3.142</code>
528
+ * <tr valign=top bgcolor="#eeeeff">
529
+ * <td><code>\@\@##</code>
530
+ * <td>2
531
+ * <td>4
532
+ * <td>1.23004
533
+ * <td><code>1.23</code>
534
+ * </table>
535
+ *
536
+ * <ul>
537
+ * <li>Significant digit counts may be expressed using patterns that
538
+ * specify a minimum and maximum number of significant digits. These
539
+ * are indicated by the <code>'@'</code> and <code>'#'</code>
540
+ * characters. The minimum number of significant digits is the number
541
+ * of <code>'@'</code> characters. The maximum number of significant
542
+ * digits is the number of <code>'@'</code> characters plus the number
543
+ * of <code>'#'</code> characters following on the right. For
544
+ * example, the pattern <code>"@@@"</code> indicates exactly 3
545
+ * significant digits. The pattern <code>"@##"</code> indicates from
546
+ * 1 to 3 significant digits. Trailing zero digits to the right of
547
+ * the decimal separator are suppressed after the minimum number of
548
+ * significant digits have been shown. For example, the pattern
549
+ * <code>"@##"</code> formats the number 0.1203 as
550
+ * <code>"0.12"</code>.
551
+ *
552
+ * <li>If a pattern uses significant digits, it may not contain a
553
+ * decimal separator, nor the <code>'0'</code> pattern character.
554
+ * Patterns such as <code>"@00"</code> or <code>"@.###"</code> are
555
+ * disallowed.
556
+ *
557
+ * <li>Any number of <code>'#'</code> characters may be prepended to
558
+ * the left of the leftmost <code>'@'</code> character. These have no
559
+ * effect on the minimum and maximum significant digits counts, but
560
+ * may be used to position grouping separators. For example,
561
+ * <code>"#,#@#"</code> indicates a minimum of one significant digits,
562
+ * a maximum of two significant digits, and a grouping size of three.
563
+ *
564
+ * <li>In order to enable significant digits formatting, use a pattern
565
+ * containing the <code>'@'</code> pattern character. Alternatively,
566
+ * call setSignificantDigitsUsed(true).
567
+ *
568
+ * <li>In order to disable significant digits formatting, use a
569
+ * pattern that does not contain the <code>'@'</code> pattern
570
+ * character. Alternatively, call setSignificantDigitsUsed(false).
571
+ *
572
+ * <li>The number of significant digits has no effect on parsing.
573
+ *
574
+ * <li>Significant digits may be used together with exponential notation. Such
575
+ * patterns are equivalent to a normal exponential pattern with a minimum and
576
+ * maximum integer digit count of one, a minimum fraction digit count of
577
+ * <code>getMinimumSignificantDigits() - 1</code>, and a maximum fraction digit
578
+ * count of <code>getMaximumSignificantDigits() - 1</code>. For example, the
579
+ * pattern <code>"@@###E0"</code> is equivalent to <code>"0.0###E0"</code>.
580
+ *
581
+ * <li>If significant digits are in use, then the integer and fraction
582
+ * digit counts, as set via the API, are ignored. If significant
583
+ * digits are not in use, then the significant digit counts, as set via
584
+ * the API, are ignored.
585
+ *
586
+ * </ul>
587
+ *
588
+ * <p><strong>Padding</strong>
589
+ *
590
+ * <p>DecimalFormat supports padding the result of
591
+ * format() to a specific width. Padding may be specified either
592
+ * through the API or through the pattern syntax. In a pattern the pad escape
593
+ * character, followed by a single pad character, causes padding to be parsed
594
+ * and formatted. The pad escape character is '*' in unlocalized patterns, and
595
+ * can be localized using DecimalFormatSymbols::setSymbol() with a
596
+ * DecimalFormatSymbols::kPadEscapeSymbol
597
+ * selector. For example, <code>"$*x#,##0.00"</code> formats 123 to
598
+ * <code>"$xx123.00"</code>, and 1234 to <code>"$1,234.00"</code>.
599
+ *
600
+ * <ul>
601
+ * <li>When padding is in effect, the width of the positive subpattern,
602
+ * including prefix and suffix, determines the format width. For example, in
603
+ * the pattern <code>"* #0 o''clock"</code>, the format width is 10.
604
+ *
605
+ * <li>The width is counted in 16-bit code units (char16_ts).
606
+ *
607
+ * <li>Some parameters which usually do not matter have meaning when padding is
608
+ * used, because the pattern width is significant with padding. In the pattern
609
+ * "* ##,##,#,##0.##", the format width is 14. The initial characters "##,##,"
610
+ * do not affect the grouping size or maximum integer digits, but they do affect
611
+ * the format width.
612
+ *
613
+ * <li>Padding may be inserted at one of four locations: before the prefix,
614
+ * after the prefix, before the suffix, or after the suffix. If padding is
615
+ * specified in any other location, applyPattern()
616
+ * sets a failing UErrorCode. If there is no prefix,
617
+ * before the prefix and after the prefix are equivalent, likewise for the
618
+ * suffix.
619
+ *
620
+ * <li>When specified in a pattern, the 32-bit code point immediately
621
+ * following the pad escape is the pad character. This may be any character,
622
+ * including a special pattern character. That is, the pad escape
623
+ * <em>escapes</em> the following character. If there is no character after
624
+ * the pad escape, then the pattern is illegal.
625
+ *
626
+ * </ul>
627
+ *
628
+ * <p><strong>Rounding</strong>
629
+ *
630
+ * <p>DecimalFormat supports rounding to a specific increment. For
631
+ * example, 1230 rounded to the nearest 50 is 1250. 1.234 rounded to the
632
+ * nearest 0.65 is 1.3. The rounding increment may be specified through the API
633
+ * or in a pattern. To specify a rounding increment in a pattern, include the
634
+ * increment in the pattern itself. "#,#50" specifies a rounding increment of
635
+ * 50. "#,##0.05" specifies a rounding increment of 0.05.
636
+ *
637
+ * <p>In the absence of an explicit rounding increment numbers are
638
+ * rounded to their formatted width.
639
+ *
640
+ * <ul>
641
+ * <li>Rounding only affects the string produced by formatting. It does
642
+ * not affect parsing or change any numerical values.
643
+ *
644
+ * <li>A <em>rounding mode</em> determines how values are rounded; see
645
+ * DecimalFormat::ERoundingMode. The default rounding mode is
646
+ * DecimalFormat::kRoundHalfEven. The rounding mode can only be set
647
+ * through the API; it can not be set with a pattern.
648
+ *
649
+ * <li>Some locales use rounding in their currency formats to reflect the
650
+ * smallest currency denomination.
651
+ *
652
+ * <li>In a pattern, digits '1' through '9' specify rounding, but otherwise
653
+ * behave identically to digit '0'.
654
+ * </ul>
655
+ *
656
+ * <p><strong>Synchronization</strong>
657
+ *
658
+ * <p>DecimalFormat objects are not synchronized. Multiple
659
+ * threads should not access one formatter concurrently.
660
+ *
661
+ * <p><strong>Subclassing</strong>
662
+ *
663
+ * <p><em>User subclasses are not supported.</em> While clients may write
664
+ * subclasses, such code will not necessarily work and will not be
665
+ * guaranteed to work stably from release to release.
666
+ */
667
+ class U_I18N_API DecimalFormat : public NumberFormat {
668
+ public:
669
+ /**
670
+ * Pad position.
671
+ * @stable ICU 2.4
672
+ */
673
+ enum EPadPosition {
674
+ kPadBeforePrefix, kPadAfterPrefix, kPadBeforeSuffix, kPadAfterSuffix
675
+ };
676
+
677
+ /**
678
+ * Create a DecimalFormat using the default pattern and symbols
679
+ * for the default locale. This is a convenient way to obtain a
680
+ * DecimalFormat when internationalization is not the main concern.
681
+ * <P>
682
+ * To obtain standard formats for a given locale, use the factory methods
683
+ * on NumberFormat such as createInstance. These factories will
684
+ * return the most appropriate sub-class of NumberFormat for a given
685
+ * locale.
686
+ * <p>
687
+ * <strong>NOTE:</strong> New users are strongly encouraged to use
688
+ * #icu::number::NumberFormatter instead of DecimalFormat.
689
+ * @param status Output param set to success/failure code. If the
690
+ * pattern is invalid this will be set to a failure code.
691
+ * @stable ICU 2.0
692
+ */
693
+ DecimalFormat(UErrorCode& status);
694
+
695
+ /**
696
+ * Create a DecimalFormat from the given pattern and the symbols
697
+ * for the default locale. This is a convenient way to obtain a
698
+ * DecimalFormat when internationalization is not the main concern.
699
+ * <P>
700
+ * To obtain standard formats for a given locale, use the factory methods
701
+ * on NumberFormat such as createInstance. These factories will
702
+ * return the most appropriate sub-class of NumberFormat for a given
703
+ * locale.
704
+ * <p>
705
+ * <strong>NOTE:</strong> New users are strongly encouraged to use
706
+ * #icu::number::NumberFormatter instead of DecimalFormat.
707
+ * @param pattern A non-localized pattern string.
708
+ * @param status Output param set to success/failure code. If the
709
+ * pattern is invalid this will be set to a failure code.
710
+ * @stable ICU 2.0
711
+ */
712
+ DecimalFormat(const UnicodeString& pattern, UErrorCode& status);
713
+
714
+ /**
715
+ * Create a DecimalFormat from the given pattern and symbols.
716
+ * Use this constructor when you need to completely customize the
717
+ * behavior of the format.
718
+ * <P>
719
+ * To obtain standard formats for a given
720
+ * locale, use the factory methods on NumberFormat such as
721
+ * createInstance or createCurrencyInstance. If you need only minor adjustments
722
+ * to a standard format, you can modify the format returned by
723
+ * a NumberFormat factory method.
724
+ * <p>
725
+ * <strong>NOTE:</strong> New users are strongly encouraged to use
726
+ * #icu::number::NumberFormatter instead of DecimalFormat.
727
+ *
728
+ * @param pattern a non-localized pattern string
729
+ * @param symbolsToAdopt the set of symbols to be used. The caller should not
730
+ * delete this object after making this call.
731
+ * @param status Output param set to success/failure code. If the
732
+ * pattern is invalid this will be set to a failure code.
733
+ * @stable ICU 2.0
734
+ */
735
+ DecimalFormat(const UnicodeString& pattern, DecimalFormatSymbols* symbolsToAdopt, UErrorCode& status);
736
+
737
+ #ifndef U_HIDE_INTERNAL_API
738
+
739
+ /**
740
+ * This API is for ICU use only.
741
+ * Create a DecimalFormat from the given pattern, symbols, and style.
742
+ *
743
+ * @param pattern a non-localized pattern string
744
+ * @param symbolsToAdopt the set of symbols to be used. The caller should not
745
+ * delete this object after making this call.
746
+ * @param style style of decimal format
747
+ * @param status Output param set to success/failure code. If the
748
+ * pattern is invalid this will be set to a failure code.
749
+ * @internal
750
+ */
751
+ DecimalFormat(const UnicodeString& pattern, DecimalFormatSymbols* symbolsToAdopt,
752
+ UNumberFormatStyle style, UErrorCode& status);
753
+
754
+ #if UCONFIG_HAVE_PARSEALLINPUT
755
+
756
+ /**
757
+ * @internal
758
+ */
759
+ void setParseAllInput(UNumberFormatAttributeValue value);
760
+
761
+ #endif
762
+
763
+ #endif /* U_HIDE_INTERNAL_API */
764
+
765
+ private:
766
+
767
+ /**
768
+ * Internal constructor for DecimalFormat; sets up internal fields. All public constructors should
769
+ * call this constructor.
770
+ */
771
+ DecimalFormat(const DecimalFormatSymbols* symbolsToAdopt, UErrorCode& status);
772
+
773
+ public:
774
+
775
+ /**
776
+ * Set an integer attribute on this DecimalFormat.
777
+ * May return U_UNSUPPORTED_ERROR if this instance does not support
778
+ * the specified attribute.
779
+ * @param attr the attribute to set
780
+ * @param newValue new value
781
+ * @param status the error type
782
+ * @return *this - for chaining (example: format.setAttribute(...).setAttribute(...) )
783
+ * @stable ICU 51
784
+ */
785
+ virtual DecimalFormat& setAttribute(UNumberFormatAttribute attr, int32_t newValue, UErrorCode& status);
786
+
787
+ /**
788
+ * Get an integer
789
+ * May return U_UNSUPPORTED_ERROR if this instance does not support
790
+ * the specified attribute.
791
+ * @param attr the attribute to set
792
+ * @param status the error type
793
+ * @return the attribute value. Undefined if there is an error.
794
+ * @stable ICU 51
795
+ */
796
+ virtual int32_t getAttribute(UNumberFormatAttribute attr, UErrorCode& status) const;
797
+
798
+
799
+ /**
800
+ * Set whether or not grouping will be used in this format.
801
+ * @param newValue True, grouping will be used in this format.
802
+ * @see getGroupingUsed
803
+ * @stable ICU 53
804
+ */
805
+ void setGroupingUsed(UBool newValue) override;
806
+
807
+ /**
808
+ * Sets whether or not numbers should be parsed as integers only.
809
+ * @param value set True, this format will parse numbers as integers
810
+ * only.
811
+ * @see isParseIntegerOnly
812
+ * @stable ICU 53
813
+ */
814
+ void setParseIntegerOnly(UBool value) override;
815
+
816
+ /**
817
+ * Sets whether lenient parsing should be enabled (it is off by default).
818
+ *
819
+ * @param enable \c true if lenient parsing should be used,
820
+ * \c false otherwise.
821
+ * @stable ICU 4.8
822
+ */
823
+ void setLenient(UBool enable) override;
824
+
825
+ /**
826
+ * Create a DecimalFormat from the given pattern and symbols.
827
+ * Use this constructor when you need to completely customize the
828
+ * behavior of the format.
829
+ * <P>
830
+ * To obtain standard formats for a given
831
+ * locale, use the factory methods on NumberFormat such as
832
+ * createInstance or createCurrencyInstance. If you need only minor adjustments
833
+ * to a standard format, you can modify the format returned by
834
+ * a NumberFormat factory method.
835
+ * <p>
836
+ * <strong>NOTE:</strong> New users are strongly encouraged to use
837
+ * #icu::number::NumberFormatter instead of DecimalFormat.
838
+ *
839
+ * @param pattern a non-localized pattern string
840
+ * @param symbolsToAdopt the set of symbols to be used. The caller should not
841
+ * delete this object after making this call.
842
+ * @param parseError Output param to receive errors occurred during parsing
843
+ * @param status Output param set to success/failure code. If the
844
+ * pattern is invalid this will be set to a failure code.
845
+ * @stable ICU 2.0
846
+ */
847
+ DecimalFormat(const UnicodeString& pattern, DecimalFormatSymbols* symbolsToAdopt,
848
+ UParseError& parseError, UErrorCode& status);
849
+
850
+ /**
851
+ * Create a DecimalFormat from the given pattern and symbols.
852
+ * Use this constructor when you need to completely customize the
853
+ * behavior of the format.
854
+ * <P>
855
+ * To obtain standard formats for a given
856
+ * locale, use the factory methods on NumberFormat such as
857
+ * createInstance or createCurrencyInstance. If you need only minor adjustments
858
+ * to a standard format, you can modify the format returned by
859
+ * a NumberFormat factory method.
860
+ * <p>
861
+ * <strong>NOTE:</strong> New users are strongly encouraged to use
862
+ * #icu::number::NumberFormatter instead of DecimalFormat.
863
+ *
864
+ * @param pattern a non-localized pattern string
865
+ * @param symbols the set of symbols to be used
866
+ * @param status Output param set to success/failure code. If the
867
+ * pattern is invalid this will be set to a failure code.
868
+ * @stable ICU 2.0
869
+ */
870
+ DecimalFormat(const UnicodeString& pattern, const DecimalFormatSymbols& symbols, UErrorCode& status);
871
+
872
+ /**
873
+ * Copy constructor.
874
+ *
875
+ * @param source the DecimalFormat object to be copied from.
876
+ * @stable ICU 2.0
877
+ */
878
+ DecimalFormat(const DecimalFormat& source);
879
+
880
+ /**
881
+ * Assignment operator.
882
+ *
883
+ * @param rhs the DecimalFormat object to be copied.
884
+ * @stable ICU 2.0
885
+ */
886
+ DecimalFormat& operator=(const DecimalFormat& rhs);
887
+
888
+ /**
889
+ * Destructor.
890
+ * @stable ICU 2.0
891
+ */
892
+ ~DecimalFormat() override;
893
+
894
+ /**
895
+ * Clone this Format object polymorphically. The caller owns the
896
+ * result and should delete it when done.
897
+ *
898
+ * @return a polymorphic copy of this DecimalFormat.
899
+ * @stable ICU 2.0
900
+ */
901
+ DecimalFormat* clone() const override;
902
+
903
+ /**
904
+ * Return true if the given Format objects are semantically equal.
905
+ * Objects of different subclasses are considered unequal.
906
+ *
907
+ * @param other the object to be compared with.
908
+ * @return true if the given Format objects are semantically equal.
909
+ * @stable ICU 2.0
910
+ */
911
+ bool operator==(const Format& other) const override;
912
+
913
+
914
+ using NumberFormat::format;
915
+
916
+ /**
917
+ * Format a double or long number using base-10 representation.
918
+ *
919
+ * @param number The value to be formatted.
920
+ * @param appendTo Output parameter to receive result.
921
+ * Result is appended to existing contents.
922
+ * @param pos On input: an alignment field, if desired.
923
+ * On output: the offsets of the alignment field.
924
+ * @return Reference to 'appendTo' parameter.
925
+ * @stable ICU 2.0
926
+ */
927
+ UnicodeString& format(double number, UnicodeString& appendTo, FieldPosition& pos) const override;
928
+
929
+ #ifndef U_HIDE_INTERNAL_API
930
+ /**
931
+ * Format a double or long number using base-10 representation.
932
+ *
933
+ * @param number The value to be formatted.
934
+ * @param appendTo Output parameter to receive result.
935
+ * Result is appended to existing contents.
936
+ * @param pos On input: an alignment field, if desired.
937
+ * On output: the offsets of the alignment field.
938
+ * @param status
939
+ * @return Reference to 'appendTo' parameter.
940
+ * @internal
941
+ */
942
+ UnicodeString& format(double number, UnicodeString& appendTo, FieldPosition& pos,
943
+ UErrorCode& status) const override;
944
+ #endif /* U_HIDE_INTERNAL_API */
945
+
946
+ /**
947
+ * Format a double or long number using base-10 representation.
948
+ *
949
+ * @param number The value to be formatted.
950
+ * @param appendTo Output parameter to receive result.
951
+ * Result is appended to existing contents.
952
+ * @param posIter On return, can be used to iterate over positions
953
+ * of fields generated by this format call.
954
+ * Can be nullptr.
955
+ * @param status Output param filled with success/failure status.
956
+ * @return Reference to 'appendTo' parameter.
957
+ * @stable ICU 4.4
958
+ */
959
+ UnicodeString& format(double number, UnicodeString& appendTo, FieldPositionIterator* posIter,
960
+ UErrorCode& status) const override;
961
+
962
+ /**
963
+ * Format a long number using base-10 representation.
964
+ *
965
+ * @param number The value to be formatted.
966
+ * @param appendTo Output parameter to receive result.
967
+ * Result is appended to existing contents.
968
+ * @param pos On input: an alignment field, if desired.
969
+ * On output: the offsets of the alignment field.
970
+ * @return Reference to 'appendTo' parameter.
971
+ * @stable ICU 2.0
972
+ */
973
+ UnicodeString& format(int32_t number, UnicodeString& appendTo, FieldPosition& pos) const override;
974
+
975
+ #ifndef U_HIDE_INTERNAL_API
976
+ /**
977
+ * Format a long number using base-10 representation.
978
+ *
979
+ * @param number The value to be formatted.
980
+ * @param appendTo Output parameter to receive result.
981
+ * Result is appended to existing contents.
982
+ * @param pos On input: an alignment field, if desired.
983
+ * On output: the offsets of the alignment field.
984
+ * @param status Output param filled with success/failure status.
985
+ * @return Reference to 'appendTo' parameter.
986
+ * @internal
987
+ */
988
+ UnicodeString& format(int32_t number, UnicodeString& appendTo, FieldPosition& pos,
989
+ UErrorCode& status) const override;
990
+ #endif /* U_HIDE_INTERNAL_API */
991
+
992
+ /**
993
+ * Format a long number using base-10 representation.
994
+ *
995
+ * @param number The value to be formatted.
996
+ * @param appendTo Output parameter to receive result.
997
+ * Result is appended to existing contents.
998
+ * @param posIter On return, can be used to iterate over positions
999
+ * of fields generated by this format call.
1000
+ * Can be nullptr.
1001
+ * @param status Output param filled with success/failure status.
1002
+ * @return Reference to 'appendTo' parameter.
1003
+ * @stable ICU 4.4
1004
+ */
1005
+ UnicodeString& format(int32_t number, UnicodeString& appendTo, FieldPositionIterator* posIter,
1006
+ UErrorCode& status) const override;
1007
+
1008
+ /**
1009
+ * Format an int64 number using base-10 representation.
1010
+ *
1011
+ * @param number The value to be formatted.
1012
+ * @param appendTo Output parameter to receive result.
1013
+ * Result is appended to existing contents.
1014
+ * @param pos On input: an alignment field, if desired.
1015
+ * On output: the offsets of the alignment field.
1016
+ * @return Reference to 'appendTo' parameter.
1017
+ * @stable ICU 2.8
1018
+ */
1019
+ UnicodeString& format(int64_t number, UnicodeString& appendTo, FieldPosition& pos) const override;
1020
+
1021
+ #ifndef U_HIDE_INTERNAL_API
1022
+ /**
1023
+ * Format an int64 number using base-10 representation.
1024
+ *
1025
+ * @param number The value to be formatted.
1026
+ * @param appendTo Output parameter to receive result.
1027
+ * Result is appended to existing contents.
1028
+ * @param pos On input: an alignment field, if desired.
1029
+ * On output: the offsets of the alignment field.
1030
+ * @param status Output param filled with success/failure status.
1031
+ * @return Reference to 'appendTo' parameter.
1032
+ * @internal
1033
+ */
1034
+ UnicodeString& format(int64_t number, UnicodeString& appendTo, FieldPosition& pos,
1035
+ UErrorCode& status) const override;
1036
+ #endif /* U_HIDE_INTERNAL_API */
1037
+
1038
+ /**
1039
+ * Format an int64 number using base-10 representation.
1040
+ *
1041
+ * @param number The value to be formatted.
1042
+ * @param appendTo Output parameter to receive result.
1043
+ * Result is appended to existing contents.
1044
+ * @param posIter On return, can be used to iterate over positions
1045
+ * of fields generated by this format call.
1046
+ * Can be nullptr.
1047
+ * @param status Output param filled with success/failure status.
1048
+ * @return Reference to 'appendTo' parameter.
1049
+ * @stable ICU 4.4
1050
+ */
1051
+ UnicodeString& format(int64_t number, UnicodeString& appendTo, FieldPositionIterator* posIter,
1052
+ UErrorCode& status) const override;
1053
+
1054
+ /**
1055
+ * Format a decimal number.
1056
+ * The syntax of the unformatted number is a "numeric string"
1057
+ * as defined in the Decimal Arithmetic Specification, available at
1058
+ * http://speleotrove.com/decimal
1059
+ *
1060
+ * @param number The unformatted number, as a string.
1061
+ * @param appendTo Output parameter to receive result.
1062
+ * Result is appended to existing contents.
1063
+ * @param posIter On return, can be used to iterate over positions
1064
+ * of fields generated by this format call.
1065
+ * Can be nullptr.
1066
+ * @param status Output param filled with success/failure status.
1067
+ * @return Reference to 'appendTo' parameter.
1068
+ * @stable ICU 4.4
1069
+ */
1070
+ UnicodeString& format(StringPiece number, UnicodeString& appendTo, FieldPositionIterator* posIter,
1071
+ UErrorCode& status) const override;
1072
+
1073
+ #ifndef U_HIDE_INTERNAL_API
1074
+
1075
+ /**
1076
+ * Format a decimal number.
1077
+ * The number is a DecimalQuantity wrapper onto a floating point decimal number.
1078
+ * The default implementation in NumberFormat converts the decimal number
1079
+ * to a double and formats that.
1080
+ *
1081
+ * @param number The number, a DecimalQuantity format Decimal Floating Point.
1082
+ * @param appendTo Output parameter to receive result.
1083
+ * Result is appended to existing contents.
1084
+ * @param posIter On return, can be used to iterate over positions
1085
+ * of fields generated by this format call.
1086
+ * @param status Output param filled with success/failure status.
1087
+ * @return Reference to 'appendTo' parameter.
1088
+ * @internal
1089
+ */
1090
+ UnicodeString& format(const number::impl::DecimalQuantity& number, UnicodeString& appendTo,
1091
+ FieldPositionIterator* posIter, UErrorCode& status) const override;
1092
+
1093
+ /**
1094
+ * Format a decimal number.
1095
+ * The number is a DecimalQuantity wrapper onto a floating point decimal number.
1096
+ * The default implementation in NumberFormat converts the decimal number
1097
+ * to a double and formats that.
1098
+ *
1099
+ * @param number The number, a DecimalQuantity format Decimal Floating Point.
1100
+ * @param appendTo Output parameter to receive result.
1101
+ * Result is appended to existing contents.
1102
+ * @param pos On input: an alignment field, if desired.
1103
+ * On output: the offsets of the alignment field.
1104
+ * @param status Output param filled with success/failure status.
1105
+ * @return Reference to 'appendTo' parameter.
1106
+ * @internal
1107
+ */
1108
+ UnicodeString& format(const number::impl::DecimalQuantity& number, UnicodeString& appendTo,
1109
+ FieldPosition& pos, UErrorCode& status) const override;
1110
+
1111
+ #endif // U_HIDE_INTERNAL_API
1112
+
1113
+ using NumberFormat::parse;
1114
+
1115
+ /**
1116
+ * Parse the given string using this object's choices. The method
1117
+ * does string comparisons to try to find an optimal match.
1118
+ * If no object can be parsed, index is unchanged, and nullptr is
1119
+ * returned. The result is returned as the most parsimonious
1120
+ * type of Formattable that will accommodate all of the
1121
+ * necessary precision. For example, if the result is exactly 12,
1122
+ * it will be returned as a long. However, if it is 1.5, it will
1123
+ * be returned as a double.
1124
+ *
1125
+ * @param text The text to be parsed.
1126
+ * @param result Formattable to be set to the parse result.
1127
+ * If parse fails, return contents are undefined.
1128
+ * @param parsePosition The position to start parsing at on input.
1129
+ * On output, moved to after the last successfully
1130
+ * parse character. On parse failure, does not change.
1131
+ * @see Formattable
1132
+ * @stable ICU 2.0
1133
+ */
1134
+ void parse(const UnicodeString& text, Formattable& result,
1135
+ ParsePosition& parsePosition) const override;
1136
+
1137
+ /**
1138
+ * Parses text from the given string as a currency amount. Unlike
1139
+ * the parse() method, this method will attempt to parse a generic
1140
+ * currency name, searching for a match of this object's locale's
1141
+ * currency display names, or for a 3-letter ISO currency code.
1142
+ * This method will fail if this format is not a currency format,
1143
+ * that is, if it does not contain the currency pattern symbol
1144
+ * (U+00A4) in its prefix or suffix.
1145
+ *
1146
+ * @param text the string to parse
1147
+ * @param pos input-output position; on input, the position within text
1148
+ * to match; must have 0 <= pos.getIndex() < text.length();
1149
+ * on output, the position after the last matched character.
1150
+ * If the parse fails, the position in unchanged upon output.
1151
+ * @return if parse succeeds, a pointer to a newly-created CurrencyAmount
1152
+ * object (owned by the caller) containing information about
1153
+ * the parsed currency; if parse fails, this is nullptr.
1154
+ * @stable ICU 49
1155
+ */
1156
+ CurrencyAmount* parseCurrency(const UnicodeString& text, ParsePosition& pos) const override;
1157
+
1158
+ /**
1159
+ * Returns the decimal format symbols, which is generally not changed
1160
+ * by the programmer or user.
1161
+ * @return desired DecimalFormatSymbols
1162
+ * @see DecimalFormatSymbols
1163
+ * @stable ICU 2.0
1164
+ */
1165
+ virtual const DecimalFormatSymbols* getDecimalFormatSymbols() const;
1166
+
1167
+ /**
1168
+ * Sets the decimal format symbols, which is generally not changed
1169
+ * by the programmer or user.
1170
+ * @param symbolsToAdopt DecimalFormatSymbols to be adopted.
1171
+ * @stable ICU 2.0
1172
+ */
1173
+ virtual void adoptDecimalFormatSymbols(DecimalFormatSymbols* symbolsToAdopt);
1174
+
1175
+ /**
1176
+ * Sets the decimal format symbols, which is generally not changed
1177
+ * by the programmer or user.
1178
+ * @param symbols DecimalFormatSymbols.
1179
+ * @stable ICU 2.0
1180
+ */
1181
+ virtual void setDecimalFormatSymbols(const DecimalFormatSymbols& symbols);
1182
+
1183
+
1184
+ /**
1185
+ * Returns the currency plural format information,
1186
+ * which is generally not changed by the programmer or user.
1187
+ * @return desired CurrencyPluralInfo
1188
+ * @stable ICU 4.2
1189
+ */
1190
+ virtual const CurrencyPluralInfo* getCurrencyPluralInfo() const;
1191
+
1192
+ /**
1193
+ * Sets the currency plural format information,
1194
+ * which is generally not changed by the programmer or user.
1195
+ * @param toAdopt CurrencyPluralInfo to be adopted.
1196
+ * @stable ICU 4.2
1197
+ */
1198
+ virtual void adoptCurrencyPluralInfo(CurrencyPluralInfo* toAdopt);
1199
+
1200
+ /**
1201
+ * Sets the currency plural format information,
1202
+ * which is generally not changed by the programmer or user.
1203
+ * @param info Currency Plural Info.
1204
+ * @stable ICU 4.2
1205
+ */
1206
+ virtual void setCurrencyPluralInfo(const CurrencyPluralInfo& info);
1207
+
1208
+
1209
+ /**
1210
+ * Get the positive prefix.
1211
+ *
1212
+ * @param result Output param which will receive the positive prefix.
1213
+ * @return A reference to 'result'.
1214
+ * Examples: +123, $123, sFr123
1215
+ * @stable ICU 2.0
1216
+ */
1217
+ UnicodeString& getPositivePrefix(UnicodeString& result) const;
1218
+
1219
+ /**
1220
+ * Set the positive prefix.
1221
+ *
1222
+ * @param newValue the new value of the the positive prefix to be set.
1223
+ * Examples: +123, $123, sFr123
1224
+ * @stable ICU 2.0
1225
+ */
1226
+ virtual void setPositivePrefix(const UnicodeString& newValue);
1227
+
1228
+ /**
1229
+ * Get the negative prefix.
1230
+ *
1231
+ * @param result Output param which will receive the negative prefix.
1232
+ * @return A reference to 'result'.
1233
+ * Examples: -123, ($123) (with negative suffix), sFr-123
1234
+ * @stable ICU 2.0
1235
+ */
1236
+ UnicodeString& getNegativePrefix(UnicodeString& result) const;
1237
+
1238
+ /**
1239
+ * Set the negative prefix.
1240
+ *
1241
+ * @param newValue the new value of the the negative prefix to be set.
1242
+ * Examples: -123, ($123) (with negative suffix), sFr-123
1243
+ * @stable ICU 2.0
1244
+ */
1245
+ virtual void setNegativePrefix(const UnicodeString& newValue);
1246
+
1247
+ /**
1248
+ * Get the positive suffix.
1249
+ *
1250
+ * @param result Output param which will receive the positive suffix.
1251
+ * @return A reference to 'result'.
1252
+ * Example: 123%
1253
+ * @stable ICU 2.0
1254
+ */
1255
+ UnicodeString& getPositiveSuffix(UnicodeString& result) const;
1256
+
1257
+ /**
1258
+ * Set the positive suffix.
1259
+ *
1260
+ * @param newValue the new value of the positive suffix to be set.
1261
+ * Example: 123%
1262
+ * @stable ICU 2.0
1263
+ */
1264
+ virtual void setPositiveSuffix(const UnicodeString& newValue);
1265
+
1266
+ /**
1267
+ * Get the negative suffix.
1268
+ *
1269
+ * @param result Output param which will receive the negative suffix.
1270
+ * @return A reference to 'result'.
1271
+ * Examples: -123%, ($123) (with positive suffixes)
1272
+ * @stable ICU 2.0
1273
+ */
1274
+ UnicodeString& getNegativeSuffix(UnicodeString& result) const;
1275
+
1276
+ /**
1277
+ * Set the negative suffix.
1278
+ *
1279
+ * @param newValue the new value of the negative suffix to be set.
1280
+ * Examples: 123%
1281
+ * @stable ICU 2.0
1282
+ */
1283
+ virtual void setNegativeSuffix(const UnicodeString& newValue);
1284
+
1285
+ /**
1286
+ * Whether to show the plus sign on positive (non-negative) numbers; for example, "+12"
1287
+ *
1288
+ * For more control over sign display, use NumberFormatter.
1289
+ *
1290
+ * @return Whether the sign is shown on positive numbers and zero.
1291
+ * @stable ICU 64
1292
+ */
1293
+ UBool isSignAlwaysShown() const;
1294
+
1295
+ /**
1296
+ * Set whether to show the plus sign on positive (non-negative) numbers; for example, "+12".
1297
+ *
1298
+ * For more control over sign display, use NumberFormatter.
1299
+ *
1300
+ * @param value true to always show a sign; false to hide the sign on positive numbers and zero.
1301
+ * @stable ICU 64
1302
+ */
1303
+ void setSignAlwaysShown(UBool value);
1304
+
1305
+ /**
1306
+ * Get the multiplier for use in percent, permill, etc.
1307
+ * For a percentage, set the suffixes to have "%" and the multiplier to be 100.
1308
+ * (For Arabic, use arabic percent symbol).
1309
+ * For a permill, set the suffixes to have "\\u2031" and the multiplier to be 1000.
1310
+ *
1311
+ * The number may also be multiplied by a power of ten; see getMultiplierScale().
1312
+ *
1313
+ * @return the multiplier for use in percent, permill, etc.
1314
+ * Examples: with 100, 1.23 -> "123", and "123" -> 1.23
1315
+ * @stable ICU 2.0
1316
+ */
1317
+ int32_t getMultiplier() const;
1318
+
1319
+ /**
1320
+ * Set the multiplier for use in percent, permill, etc.
1321
+ * For a percentage, set the suffixes to have "%" and the multiplier to be 100.
1322
+ * (For Arabic, use arabic percent symbol).
1323
+ * For a permill, set the suffixes to have "\\u2031" and the multiplier to be 1000.
1324
+ *
1325
+ * This method only supports integer multipliers. To multiply by a non-integer, pair this
1326
+ * method with setMultiplierScale().
1327
+ *
1328
+ * @param newValue the new value of the multiplier for use in percent, permill, etc.
1329
+ * Examples: with 100, 1.23 -> "123", and "123" -> 1.23
1330
+ * @stable ICU 2.0
1331
+ */
1332
+ virtual void setMultiplier(int32_t newValue);
1333
+
1334
+ /**
1335
+ * Gets the power of ten by which number should be multiplied before formatting, which
1336
+ * can be combined with setMultiplier() to multiply by any arbitrary decimal value.
1337
+ *
1338
+ * A multiplier scale of 2 corresponds to multiplication by 100, and a multiplier scale
1339
+ * of -2 corresponds to multiplication by 0.01.
1340
+ *
1341
+ * This method is analogous to UNUM_SCALE in getAttribute.
1342
+ *
1343
+ * @return the current value of the power-of-ten multiplier.
1344
+ * @stable ICU 62
1345
+ */
1346
+ int32_t getMultiplierScale() const;
1347
+
1348
+ /**
1349
+ * Sets a power of ten by which number should be multiplied before formatting, which
1350
+ * can be combined with setMultiplier() to multiply by any arbitrary decimal value.
1351
+ *
1352
+ * A multiplier scale of 2 corresponds to multiplication by 100, and a multiplier scale
1353
+ * of -2 corresponds to multiplication by 0.01.
1354
+ *
1355
+ * For example, to multiply numbers by 0.5 before formatting, you can do:
1356
+ *
1357
+ * <pre>
1358
+ * df.setMultiplier(5);
1359
+ * df.setMultiplierScale(-1);
1360
+ * </pre>
1361
+ *
1362
+ * This method is analogous to UNUM_SCALE in setAttribute.
1363
+ *
1364
+ * @param newValue the new value of the power-of-ten multiplier.
1365
+ * @stable ICU 62
1366
+ */
1367
+ void setMultiplierScale(int32_t newValue);
1368
+
1369
+ /**
1370
+ * Get the rounding increment.
1371
+ * @return A positive rounding increment, or 0.0 if a custom rounding
1372
+ * increment is not in effect.
1373
+ * @see #setRoundingIncrement
1374
+ * @see #getRoundingMode
1375
+ * @see #setRoundingMode
1376
+ * @stable ICU 2.0
1377
+ */
1378
+ virtual double getRoundingIncrement() const;
1379
+
1380
+ /**
1381
+ * Set the rounding increment. In the absence of a rounding increment,
1382
+ * numbers will be rounded to the number of digits displayed.
1383
+ * @param newValue A positive rounding increment, or 0.0 to
1384
+ * use the default rounding increment.
1385
+ * Negative increments are equivalent to 0.0.
1386
+ * @see #getRoundingIncrement
1387
+ * @see #getRoundingMode
1388
+ * @see #setRoundingMode
1389
+ * @stable ICU 2.0
1390
+ */
1391
+ virtual void setRoundingIncrement(double newValue);
1392
+
1393
+ /**
1394
+ * Get the rounding mode.
1395
+ * @return A rounding mode
1396
+ * @see #setRoundingIncrement
1397
+ * @see #getRoundingIncrement
1398
+ * @see #setRoundingMode
1399
+ * @stable ICU 2.0
1400
+ */
1401
+ virtual ERoundingMode getRoundingMode() const override;
1402
+
1403
+ /**
1404
+ * Set the rounding mode.
1405
+ * @param roundingMode A rounding mode
1406
+ * @see #setRoundingIncrement
1407
+ * @see #getRoundingIncrement
1408
+ * @see #getRoundingMode
1409
+ * @stable ICU 2.0
1410
+ */
1411
+ virtual void setRoundingMode(ERoundingMode roundingMode) override;
1412
+
1413
+ /**
1414
+ * Get the width to which the output of format() is padded.
1415
+ * The width is counted in 16-bit code units.
1416
+ * @return the format width, or zero if no padding is in effect
1417
+ * @see #setFormatWidth
1418
+ * @see #getPadCharacterString
1419
+ * @see #setPadCharacter
1420
+ * @see #getPadPosition
1421
+ * @see #setPadPosition
1422
+ * @stable ICU 2.0
1423
+ */
1424
+ virtual int32_t getFormatWidth() const;
1425
+
1426
+ /**
1427
+ * Set the width to which the output of format() is padded.
1428
+ * The width is counted in 16-bit code units.
1429
+ * This method also controls whether padding is enabled.
1430
+ * @param width the width to which to pad the result of
1431
+ * format(), or zero to disable padding. A negative
1432
+ * width is equivalent to 0.
1433
+ * @see #getFormatWidth
1434
+ * @see #getPadCharacterString
1435
+ * @see #setPadCharacter
1436
+ * @see #getPadPosition
1437
+ * @see #setPadPosition
1438
+ * @stable ICU 2.0
1439
+ */
1440
+ virtual void setFormatWidth(int32_t width);
1441
+
1442
+ /**
1443
+ * Get the pad character used to pad to the format width. The
1444
+ * default is ' '.
1445
+ * @return a string containing the pad character. This will always
1446
+ * have a length of one 32-bit code point.
1447
+ * @see #setFormatWidth
1448
+ * @see #getFormatWidth
1449
+ * @see #setPadCharacter
1450
+ * @see #getPadPosition
1451
+ * @see #setPadPosition
1452
+ * @stable ICU 2.0
1453
+ */
1454
+ virtual UnicodeString getPadCharacterString() const;
1455
+
1456
+ /**
1457
+ * Set the character used to pad to the format width. If padding
1458
+ * is not enabled, then this will take effect if padding is later
1459
+ * enabled.
1460
+ * @param padChar a string containing the pad character. If the string
1461
+ * has length 0, then the pad character is set to ' '. Otherwise
1462
+ * padChar.char32At(0) will be used as the pad character.
1463
+ * @see #setFormatWidth
1464
+ * @see #getFormatWidth
1465
+ * @see #getPadCharacterString
1466
+ * @see #getPadPosition
1467
+ * @see #setPadPosition
1468
+ * @stable ICU 2.0
1469
+ */
1470
+ virtual void setPadCharacter(const UnicodeString& padChar);
1471
+
1472
+ /**
1473
+ * Get the position at which padding will take place. This is the location
1474
+ * at which padding will be inserted if the result of format()
1475
+ * is shorter than the format width.
1476
+ * @return the pad position, one of kPadBeforePrefix,
1477
+ * kPadAfterPrefix, kPadBeforeSuffix, or
1478
+ * kPadAfterSuffix.
1479
+ * @see #setFormatWidth
1480
+ * @see #getFormatWidth
1481
+ * @see #setPadCharacter
1482
+ * @see #getPadCharacterString
1483
+ * @see #setPadPosition
1484
+ * @see #EPadPosition
1485
+ * @stable ICU 2.0
1486
+ */
1487
+ virtual EPadPosition getPadPosition() const;
1488
+
1489
+ /**
1490
+ * Set the position at which padding will take place. This is the location
1491
+ * at which padding will be inserted if the result of format()
1492
+ * is shorter than the format width. This has no effect unless padding is
1493
+ * enabled.
1494
+ * @param padPos the pad position, one of kPadBeforePrefix,
1495
+ * kPadAfterPrefix, kPadBeforeSuffix, or
1496
+ * kPadAfterSuffix.
1497
+ * @see #setFormatWidth
1498
+ * @see #getFormatWidth
1499
+ * @see #setPadCharacter
1500
+ * @see #getPadCharacterString
1501
+ * @see #getPadPosition
1502
+ * @see #EPadPosition
1503
+ * @stable ICU 2.0
1504
+ */
1505
+ virtual void setPadPosition(EPadPosition padPos);
1506
+
1507
+ /**
1508
+ * Return whether or not scientific notation is used.
1509
+ * @return true if this object formats and parses scientific notation
1510
+ * @see #setScientificNotation
1511
+ * @see #getMinimumExponentDigits
1512
+ * @see #setMinimumExponentDigits
1513
+ * @see #isExponentSignAlwaysShown
1514
+ * @see #setExponentSignAlwaysShown
1515
+ * @stable ICU 2.0
1516
+ */
1517
+ virtual UBool isScientificNotation() const;
1518
+
1519
+ /**
1520
+ * Set whether or not scientific notation is used. When scientific notation
1521
+ * is used, the effective maximum number of integer digits is <= 8. If the
1522
+ * maximum number of integer digits is set to more than 8, the effective
1523
+ * maximum will be 1. This allows this call to generate a 'default' scientific
1524
+ * number format without additional changes.
1525
+ * @param useScientific true if this object formats and parses scientific
1526
+ * notation
1527
+ * @see #isScientificNotation
1528
+ * @see #getMinimumExponentDigits
1529
+ * @see #setMinimumExponentDigits
1530
+ * @see #isExponentSignAlwaysShown
1531
+ * @see #setExponentSignAlwaysShown
1532
+ * @stable ICU 2.0
1533
+ */
1534
+ virtual void setScientificNotation(UBool useScientific);
1535
+
1536
+ /**
1537
+ * Return the minimum exponent digits that will be shown.
1538
+ * @return the minimum exponent digits that will be shown
1539
+ * @see #setScientificNotation
1540
+ * @see #isScientificNotation
1541
+ * @see #setMinimumExponentDigits
1542
+ * @see #isExponentSignAlwaysShown
1543
+ * @see #setExponentSignAlwaysShown
1544
+ * @stable ICU 2.0
1545
+ */
1546
+ virtual int8_t getMinimumExponentDigits() const;
1547
+
1548
+ /**
1549
+ * Set the minimum exponent digits that will be shown. This has no
1550
+ * effect unless scientific notation is in use.
1551
+ * @param minExpDig a value >= 1 indicating the fewest exponent digits
1552
+ * that will be shown. Values less than 1 will be treated as 1.
1553
+ * @see #setScientificNotation
1554
+ * @see #isScientificNotation
1555
+ * @see #getMinimumExponentDigits
1556
+ * @see #isExponentSignAlwaysShown
1557
+ * @see #setExponentSignAlwaysShown
1558
+ * @stable ICU 2.0
1559
+ */
1560
+ virtual void setMinimumExponentDigits(int8_t minExpDig);
1561
+
1562
+ /**
1563
+ * Return whether the exponent sign is always shown.
1564
+ * @return true if the exponent is always prefixed with either the
1565
+ * localized minus sign or the localized plus sign, false if only negative
1566
+ * exponents are prefixed with the localized minus sign.
1567
+ * @see #setScientificNotation
1568
+ * @see #isScientificNotation
1569
+ * @see #setMinimumExponentDigits
1570
+ * @see #getMinimumExponentDigits
1571
+ * @see #setExponentSignAlwaysShown
1572
+ * @stable ICU 2.0
1573
+ */
1574
+ virtual UBool isExponentSignAlwaysShown() const;
1575
+
1576
+ /**
1577
+ * Set whether the exponent sign is always shown. This has no effect
1578
+ * unless scientific notation is in use.
1579
+ * @param expSignAlways true if the exponent is always prefixed with either
1580
+ * the localized minus sign or the localized plus sign, false if only
1581
+ * negative exponents are prefixed with the localized minus sign.
1582
+ * @see #setScientificNotation
1583
+ * @see #isScientificNotation
1584
+ * @see #setMinimumExponentDigits
1585
+ * @see #getMinimumExponentDigits
1586
+ * @see #isExponentSignAlwaysShown
1587
+ * @stable ICU 2.0
1588
+ */
1589
+ virtual void setExponentSignAlwaysShown(UBool expSignAlways);
1590
+
1591
+ /**
1592
+ * Return the grouping size. Grouping size is the number of digits between
1593
+ * grouping separators in the integer portion of a number. For example,
1594
+ * in the number "123,456.78", the grouping size is 3.
1595
+ *
1596
+ * @return the grouping size.
1597
+ * @see setGroupingSize
1598
+ * @see NumberFormat::isGroupingUsed
1599
+ * @see DecimalFormatSymbols::getGroupingSeparator
1600
+ * @stable ICU 2.0
1601
+ */
1602
+ int32_t getGroupingSize() const;
1603
+
1604
+ /**
1605
+ * Set the grouping size. Grouping size is the number of digits between
1606
+ * grouping separators in the integer portion of a number. For example,
1607
+ * in the number "123,456.78", the grouping size is 3.
1608
+ *
1609
+ * @param newValue the new value of the grouping size.
1610
+ * @see getGroupingSize
1611
+ * @see NumberFormat::setGroupingUsed
1612
+ * @see DecimalFormatSymbols::setGroupingSeparator
1613
+ * @stable ICU 2.0
1614
+ */
1615
+ virtual void setGroupingSize(int32_t newValue);
1616
+
1617
+ /**
1618
+ * Return the secondary grouping size. In some locales one
1619
+ * grouping interval is used for the least significant integer
1620
+ * digits (the primary grouping size), and another is used for all
1621
+ * others (the secondary grouping size). A formatter supporting a
1622
+ * secondary grouping size will return a positive integer unequal
1623
+ * to the primary grouping size returned by
1624
+ * getGroupingSize(). For example, if the primary
1625
+ * grouping size is 4, and the secondary grouping size is 2, then
1626
+ * the number 123456789 formats as "1,23,45,6789", and the pattern
1627
+ * appears as "#,##,###0".
1628
+ * @return the secondary grouping size, or a value less than
1629
+ * one if there is none
1630
+ * @see setSecondaryGroupingSize
1631
+ * @see NumberFormat::isGroupingUsed
1632
+ * @see DecimalFormatSymbols::getGroupingSeparator
1633
+ * @stable ICU 2.4
1634
+ */
1635
+ int32_t getSecondaryGroupingSize() const;
1636
+
1637
+ /**
1638
+ * Set the secondary grouping size. If set to a value less than 1,
1639
+ * then secondary grouping is turned off, and the primary grouping
1640
+ * size is used for all intervals, not just the least significant.
1641
+ *
1642
+ * @param newValue the new value of the secondary grouping size.
1643
+ * @see getSecondaryGroupingSize
1644
+ * @see NumberFormat#setGroupingUsed
1645
+ * @see DecimalFormatSymbols::setGroupingSeparator
1646
+ * @stable ICU 2.4
1647
+ */
1648
+ virtual void setSecondaryGroupingSize(int32_t newValue);
1649
+
1650
+ /**
1651
+ * Returns the minimum number of grouping digits.
1652
+ * Grouping separators are output if there are at least this many
1653
+ * digits to the left of the first (rightmost) grouping separator,
1654
+ * that is, there are at least (minimum grouping + grouping size) integer digits.
1655
+ * (Subject to isGroupingUsed().)
1656
+ *
1657
+ * For example, if this value is 2, and the grouping size is 3, then
1658
+ * 9999 -> "9999" and 10000 -> "10,000"
1659
+ *
1660
+ * The default value for this attribute is 0.
1661
+ * A value of 1, 0, or lower, means that the use of grouping separators
1662
+ * only depends on the grouping size (and on isGroupingUsed()).
1663
+ *
1664
+ * NOTE: The CLDR data is used in NumberFormatter but not in DecimalFormat.
1665
+ * This is for backwards compatibility reasons.
1666
+ *
1667
+ * For more control over grouping strategies, use NumberFormatter.
1668
+ *
1669
+ * @see setMinimumGroupingDigits
1670
+ * @see getGroupingSize
1671
+ * @stable ICU 64
1672
+ */
1673
+ int32_t getMinimumGroupingDigits() const;
1674
+
1675
+ /**
1676
+ * Sets the minimum grouping digits. Setting the value to
1677
+ * - 1: Turns off minimum grouping digits.
1678
+ * - 0 or -1: The behavior is undefined.
1679
+ * - UNUM_MINIMUM_GROUPING_DIGITS_AUTO: Display grouping using the default
1680
+ * strategy for all locales.
1681
+ * - UNUM_MINIMUM_GROUPING_DIGITS_MIN2: Display grouping using locale
1682
+ * defaults, except do not show grouping on values smaller than 10000
1683
+ * (such that there is a minimum of two digits before the first
1684
+ * separator).
1685
+ *
1686
+ * For more control over grouping strategies, use NumberFormatter.
1687
+ *
1688
+ * @param newValue the new value of minimum grouping digits.
1689
+ * @see getMinimumGroupingDigits
1690
+ * @stable ICU 64
1691
+ */
1692
+ void setMinimumGroupingDigits(int32_t newValue);
1693
+
1694
+ /**
1695
+ * Allows you to get the behavior of the decimal separator with integers.
1696
+ * (The decimal separator will always appear with decimals.)
1697
+ *
1698
+ * @return true if the decimal separator always appear with decimals.
1699
+ * Example: Decimal ON: 12345 -> 12345.; OFF: 12345 -> 12345
1700
+ * @stable ICU 2.0
1701
+ */
1702
+ UBool isDecimalSeparatorAlwaysShown() const;
1703
+
1704
+ /**
1705
+ * Allows you to set the behavior of the decimal separator with integers.
1706
+ * (The decimal separator will always appear with decimals.)
1707
+ *
1708
+ * @param newValue set true if the decimal separator will always appear with decimals.
1709
+ * Example: Decimal ON: 12345 -> 12345.; OFF: 12345 -> 12345
1710
+ * @stable ICU 2.0
1711
+ */
1712
+ virtual void setDecimalSeparatorAlwaysShown(UBool newValue);
1713
+
1714
+ /**
1715
+ * Allows you to get the parse behavior of the pattern decimal mark.
1716
+ *
1717
+ * @return true if input must contain a match to decimal mark in pattern
1718
+ * @stable ICU 54
1719
+ */
1720
+ UBool isDecimalPatternMatchRequired() const;
1721
+
1722
+ /**
1723
+ * Allows you to set the parse behavior of the pattern decimal mark.
1724
+ *
1725
+ * if true, the input must have a decimal mark if one was specified in the pattern. When
1726
+ * false the decimal mark may be omitted from the input.
1727
+ *
1728
+ * @param newValue set true if input must contain a match to decimal mark in pattern
1729
+ * @stable ICU 54
1730
+ */
1731
+ virtual void setDecimalPatternMatchRequired(UBool newValue);
1732
+
1733
+ /**
1734
+ * Returns whether to ignore exponents when parsing.
1735
+ *
1736
+ * @return Whether to ignore exponents when parsing.
1737
+ * @see #setParseNoExponent
1738
+ * @stable ICU 64
1739
+ */
1740
+ UBool isParseNoExponent() const;
1741
+
1742
+ /**
1743
+ * Specifies whether to stop parsing when an exponent separator is encountered. For
1744
+ * example, parses "123E4" to 123 (with parse position 3) instead of 1230000 (with parse position
1745
+ * 5).
1746
+ *
1747
+ * @param value true to prevent exponents from being parsed; false to allow them to be parsed.
1748
+ * @stable ICU 64
1749
+ */
1750
+ void setParseNoExponent(UBool value);
1751
+
1752
+ /**
1753
+ * Returns whether parsing is sensitive to case (lowercase/uppercase).
1754
+ *
1755
+ * @return Whether parsing is case-sensitive.
1756
+ * @see #setParseCaseSensitive
1757
+ * @stable ICU 64
1758
+ */
1759
+ UBool isParseCaseSensitive() const;
1760
+
1761
+ /**
1762
+ * Whether to pay attention to case when parsing; default is to ignore case (perform
1763
+ * case-folding). For example, "A" == "a" in case-insensitive but not case-sensitive mode.
1764
+ *
1765
+ * Currency symbols are never case-folded. For example, "us$1.00" will not parse in case-insensitive
1766
+ * mode, even though "US$1.00" parses.
1767
+ *
1768
+ * @param value true to enable case-sensitive parsing (the default); false to force
1769
+ * case-sensitive parsing behavior.
1770
+ * @stable ICU 64
1771
+ */
1772
+ void setParseCaseSensitive(UBool value);
1773
+
1774
+ /**
1775
+ * Returns whether truncation of high-order integer digits should result in an error.
1776
+ * By default, setMaximumIntegerDigits truncates high-order digits silently.
1777
+ *
1778
+ * @return Whether an error code is set if high-order digits are truncated.
1779
+ * @see setFormatFailIfMoreThanMaxDigits
1780
+ * @stable ICU 64
1781
+ */
1782
+ UBool isFormatFailIfMoreThanMaxDigits() const;
1783
+
1784
+ /**
1785
+ * Sets whether truncation of high-order integer digits should result in an error.
1786
+ * By default, setMaximumIntegerDigits truncates high-order digits silently.
1787
+ *
1788
+ * @param value Whether to set an error code if high-order digits are truncated.
1789
+ * @stable ICU 64
1790
+ */
1791
+ void setFormatFailIfMoreThanMaxDigits(UBool value);
1792
+
1793
+ /**
1794
+ * Synthesizes a pattern string that represents the current state
1795
+ * of this Format object.
1796
+ *
1797
+ * @param result Output param which will receive the pattern.
1798
+ * Previous contents are deleted.
1799
+ * @return A reference to 'result'.
1800
+ * @see applyPattern
1801
+ * @stable ICU 2.0
1802
+ */
1803
+ virtual UnicodeString& toPattern(UnicodeString& result) const;
1804
+
1805
+ /**
1806
+ * Synthesizes a localized pattern string that represents the current
1807
+ * state of this Format object.
1808
+ *
1809
+ * @param result Output param which will receive the localized pattern.
1810
+ * Previous contents are deleted.
1811
+ * @return A reference to 'result'.
1812
+ * @see applyPattern
1813
+ * @stable ICU 2.0
1814
+ */
1815
+ virtual UnicodeString& toLocalizedPattern(UnicodeString& result) const;
1816
+
1817
+ /**
1818
+ * Apply the given pattern to this Format object. A pattern is a
1819
+ * short-hand specification for the various formatting properties.
1820
+ * These properties can also be changed individually through the
1821
+ * various setter methods.
1822
+ * <P>
1823
+ * There is no limit to integer digits are set
1824
+ * by this routine, since that is the typical end-user desire;
1825
+ * use setMaximumInteger if you want to set a real value.
1826
+ * For negative numbers, use a second pattern, separated by a semicolon
1827
+ * <pre>
1828
+ * . Example "#,#00.0#" -> 1,234.56
1829
+ * </pre>
1830
+ * This means a minimum of 2 integer digits, 1 fraction digit, and
1831
+ * a maximum of 2 fraction digits.
1832
+ * <pre>
1833
+ * . Example: "#,#00.0#;(#,#00.0#)" for negatives in parentheses.
1834
+ * </pre>
1835
+ * In negative patterns, the minimum and maximum counts are ignored;
1836
+ * these are presumed to be set in the positive pattern.
1837
+ *
1838
+ * @param pattern The pattern to be applied.
1839
+ * @param parseError Struct to receive information on position
1840
+ * of error if an error is encountered
1841
+ * @param status Output param set to success/failure code on
1842
+ * exit. If the pattern is invalid, this will be
1843
+ * set to a failure result.
1844
+ * @stable ICU 2.0
1845
+ */
1846
+ virtual void applyPattern(const UnicodeString& pattern, UParseError& parseError, UErrorCode& status);
1847
+
1848
+ /**
1849
+ * Sets the pattern.
1850
+ * @param pattern The pattern to be applied.
1851
+ * @param status Output param set to success/failure code on
1852
+ * exit. If the pattern is invalid, this will be
1853
+ * set to a failure result.
1854
+ * @stable ICU 2.0
1855
+ */
1856
+ virtual void applyPattern(const UnicodeString& pattern, UErrorCode& status);
1857
+
1858
+ /**
1859
+ * Apply the given pattern to this Format object. The pattern
1860
+ * is assumed to be in a localized notation. A pattern is a
1861
+ * short-hand specification for the various formatting properties.
1862
+ * These properties can also be changed individually through the
1863
+ * various setter methods.
1864
+ * <P>
1865
+ * There is no limit to integer digits are set
1866
+ * by this routine, since that is the typical end-user desire;
1867
+ * use setMaximumInteger if you want to set a real value.
1868
+ * For negative numbers, use a second pattern, separated by a semicolon
1869
+ * <pre>
1870
+ * . Example "#,#00.0#" -> 1,234.56
1871
+ * </pre>
1872
+ * This means a minimum of 2 integer digits, 1 fraction digit, and
1873
+ * a maximum of 2 fraction digits.
1874
+ *
1875
+ * Example: "#,#00.0#;(#,#00.0#)" for negatives in parentheses.
1876
+ *
1877
+ * In negative patterns, the minimum and maximum counts are ignored;
1878
+ * these are presumed to be set in the positive pattern.
1879
+ *
1880
+ * @param pattern The localized pattern to be applied.
1881
+ * @param parseError Struct to receive information on position
1882
+ * of error if an error is encountered
1883
+ * @param status Output param set to success/failure code on
1884
+ * exit. If the pattern is invalid, this will be
1885
+ * set to a failure result.
1886
+ * @stable ICU 2.0
1887
+ */
1888
+ virtual void applyLocalizedPattern(const UnicodeString& pattern, UParseError& parseError,
1889
+ UErrorCode& status);
1890
+
1891
+ /**
1892
+ * Apply the given pattern to this Format object.
1893
+ *
1894
+ * @param pattern The localized pattern to be applied.
1895
+ * @param status Output param set to success/failure code on
1896
+ * exit. If the pattern is invalid, this will be
1897
+ * set to a failure result.
1898
+ * @stable ICU 2.0
1899
+ */
1900
+ virtual void applyLocalizedPattern(const UnicodeString& pattern, UErrorCode& status);
1901
+
1902
+
1903
+ /**
1904
+ * Sets the maximum number of digits allowed in the integer portion of a
1905
+ * number. This override limits the integer digit count to 309.
1906
+ *
1907
+ * @param newValue the new value of the maximum number of digits
1908
+ * allowed in the integer portion of a number.
1909
+ * @see NumberFormat#setMaximumIntegerDigits
1910
+ * @stable ICU 2.0
1911
+ */
1912
+ void setMaximumIntegerDigits(int32_t newValue) override;
1913
+
1914
+ /**
1915
+ * Sets the minimum number of digits allowed in the integer portion of a
1916
+ * number. This override limits the integer digit count to 309.
1917
+ *
1918
+ * @param newValue the new value of the minimum number of digits
1919
+ * allowed in the integer portion of a number.
1920
+ * @see NumberFormat#setMinimumIntegerDigits
1921
+ * @stable ICU 2.0
1922
+ */
1923
+ void setMinimumIntegerDigits(int32_t newValue) override;
1924
+
1925
+ /**
1926
+ * Sets the maximum number of digits allowed in the fraction portion of a
1927
+ * number. This override limits the fraction digit count to 340.
1928
+ *
1929
+ * @param newValue the new value of the maximum number of digits
1930
+ * allowed in the fraction portion of a number.
1931
+ * @see NumberFormat#setMaximumFractionDigits
1932
+ * @stable ICU 2.0
1933
+ */
1934
+ void setMaximumFractionDigits(int32_t newValue) override;
1935
+
1936
+ /**
1937
+ * Sets the minimum number of digits allowed in the fraction portion of a
1938
+ * number. This override limits the fraction digit count to 340.
1939
+ *
1940
+ * @param newValue the new value of the minimum number of digits
1941
+ * allowed in the fraction portion of a number.
1942
+ * @see NumberFormat#setMinimumFractionDigits
1943
+ * @stable ICU 2.0
1944
+ */
1945
+ void setMinimumFractionDigits(int32_t newValue) override;
1946
+
1947
+ /**
1948
+ * Returns the minimum number of significant digits that will be
1949
+ * displayed. This value has no effect unless areSignificantDigitsUsed()
1950
+ * returns true.
1951
+ * @return the fewest significant digits that will be shown
1952
+ * @stable ICU 3.0
1953
+ */
1954
+ int32_t getMinimumSignificantDigits() const;
1955
+
1956
+ /**
1957
+ * Returns the maximum number of significant digits that will be
1958
+ * displayed. This value has no effect unless areSignificantDigitsUsed()
1959
+ * returns true.
1960
+ * @return the most significant digits that will be shown
1961
+ * @stable ICU 3.0
1962
+ */
1963
+ int32_t getMaximumSignificantDigits() const;
1964
+
1965
+ /**
1966
+ * Sets the minimum number of significant digits that will be
1967
+ * displayed. If <code>min</code> is less than one then it is set
1968
+ * to one. If the maximum significant digits count is less than
1969
+ * <code>min</code>, then it is set to <code>min</code>.
1970
+ * This function also enables the use of significant digits
1971
+ * by this formatter - areSignificantDigitsUsed() will return true.
1972
+ * @see #areSignificantDigitsUsed
1973
+ * @param min the fewest significant digits to be shown
1974
+ * @stable ICU 3.0
1975
+ */
1976
+ void setMinimumSignificantDigits(int32_t min);
1977
+
1978
+ /**
1979
+ * Sets the maximum number of significant digits that will be
1980
+ * displayed. If <code>max</code> is less than one then it is set
1981
+ * to one. If the minimum significant digits count is greater
1982
+ * than <code>max</code>, then it is set to <code>max</code>.
1983
+ * This function also enables the use of significant digits
1984
+ * by this formatter - areSignificantDigitsUsed() will return true.
1985
+ * @see #areSignificantDigitsUsed
1986
+ * @param max the most significant digits to be shown
1987
+ * @stable ICU 3.0
1988
+ */
1989
+ void setMaximumSignificantDigits(int32_t max);
1990
+
1991
+ /**
1992
+ * Returns true if significant digits are in use, or false if
1993
+ * integer and fraction digit counts are in use.
1994
+ * @return true if significant digits are in use
1995
+ * @stable ICU 3.0
1996
+ */
1997
+ UBool areSignificantDigitsUsed() const;
1998
+
1999
+ /**
2000
+ * Sets whether significant digits are in use, or integer and
2001
+ * fraction digit counts are in use.
2002
+ * @param useSignificantDigits true to use significant digits, or
2003
+ * false to use integer and fraction digit counts
2004
+ * @stable ICU 3.0
2005
+ */
2006
+ void setSignificantDigitsUsed(UBool useSignificantDigits);
2007
+
2008
+ #if APPLE_ICU_CHANGES
2009
+ // rdar://
2010
+ #ifndef U_HIDE_INTERNAL_API
2011
+ /**
2012
+ * Group-set several settings used for numbers in date formats.
2013
+ * Avoids calls to touch for each separate setting.
2014
+ * Equivalent to:
2015
+ * setGroupingUsed(false);
2016
+ * setDecimalSeparatorAlwaysShown(false);
2017
+ * setParseIntegerOnly(true);
2018
+ * setMinimumFractionDigits(0);
2019
+ * @internal
2020
+ */
2021
+ void setDateSettings(void) override;
2022
+ #endif /* U_HIDE_INTERNAL_API */
2023
+ #endif // APPLE_ICU_CHANGES
2024
+
2025
+ /**
2026
+ * Sets the currency used to display currency
2027
+ * amounts. This takes effect immediately, if this format is a
2028
+ * currency format. If this format is not a currency format, then
2029
+ * the currency is used if and when this object becomes a
2030
+ * currency format through the application of a new pattern.
2031
+ * @param theCurrency a 3-letter ISO code indicating new currency
2032
+ * to use. It need not be null-terminated. May be the empty
2033
+ * string or nullptr to indicate no currency.
2034
+ * @param ec input-output error code
2035
+ * @stable ICU 3.0
2036
+ */
2037
+ void setCurrency(const char16_t* theCurrency, UErrorCode& ec) override;
2038
+
2039
+ #ifndef U_FORCE_HIDE_DEPRECATED_API
2040
+ /**
2041
+ * Sets the currency used to display currency amounts. See
2042
+ * setCurrency(const char16_t*, UErrorCode&).
2043
+ * @deprecated ICU 3.0. Use setCurrency(const char16_t*, UErrorCode&).
2044
+ */
2045
+ virtual void setCurrency(const char16_t* theCurrency);
2046
+ #endif // U_FORCE_HIDE_DEPRECATED_API
2047
+
2048
+ /**
2049
+ * Sets the `Currency Usage` object used to display currency.
2050
+ * This takes effect immediately, if this format is a
2051
+ * currency format.
2052
+ * @param newUsage new currency usage object to use.
2053
+ * @param ec input-output error code
2054
+ * @stable ICU 54
2055
+ */
2056
+ void setCurrencyUsage(UCurrencyUsage newUsage, UErrorCode* ec);
2057
+
2058
+ /**
2059
+ * Returns the `Currency Usage` object used to display currency
2060
+ * @stable ICU 54
2061
+ */
2062
+ UCurrencyUsage getCurrencyUsage() const;
2063
+
2064
+ #ifndef U_HIDE_INTERNAL_API
2065
+
2066
+ /**
2067
+ * Format a number and save it into the given DecimalQuantity.
2068
+ * Internal, not intended for public use.
2069
+ * @internal
2070
+ */
2071
+ void formatToDecimalQuantity(double number, number::impl::DecimalQuantity& output,
2072
+ UErrorCode& status) const;
2073
+
2074
+ /**
2075
+ * Get a DecimalQuantity corresponding to a formattable as it would be
2076
+ * formatted by this DecimalFormat.
2077
+ * Internal, not intended for public use.
2078
+ * @internal
2079
+ */
2080
+ void formatToDecimalQuantity(const Formattable& number, number::impl::DecimalQuantity& output,
2081
+ UErrorCode& status) const;
2082
+
2083
+ #endif /* U_HIDE_INTERNAL_API */
2084
+
2085
+ /**
2086
+ * Converts this DecimalFormat to a (Localized)NumberFormatter. Starting
2087
+ * in ICU 60, NumberFormatter is the recommended way to format numbers.
2088
+ * You can use the returned LocalizedNumberFormatter to format numbers and
2089
+ * get a FormattedNumber, which contains a string as well as additional
2090
+ * annotations about the formatted value.
2091
+ *
2092
+ * If a memory allocation failure occurs, the return value of this method
2093
+ * might be null. If you are concerned about correct recovery from
2094
+ * out-of-memory situations, use this pattern:
2095
+ *
2096
+ * <pre>
2097
+ * FormattedNumber result;
2098
+ * if (auto* ptr = df->toNumberFormatter(status)) {
2099
+ * result = ptr->formatDouble(123, status);
2100
+ * }
2101
+ * </pre>
2102
+ *
2103
+ * If you are not concerned about out-of-memory situations, or if your
2104
+ * environment throws exceptions when memory allocation failure occurs,
2105
+ * you can chain the methods, like this:
2106
+ *
2107
+ * <pre>
2108
+ * FormattedNumber result = df
2109
+ * ->toNumberFormatter(status)
2110
+ * ->formatDouble(123, status);
2111
+ * </pre>
2112
+ *
2113
+ * NOTE: The returned LocalizedNumberFormatter is owned by this DecimalFormat.
2114
+ * If a non-const method is called on the DecimalFormat, or if the DecimalFormat
2115
+ * is deleted, the object becomes invalid. If you plan to keep the return value
2116
+ * beyond the lifetime of the DecimalFormat, copy it to a local variable:
2117
+ *
2118
+ * <pre>
2119
+ * LocalizedNumberFormatter lnf;
2120
+ * if (auto* ptr = df->toNumberFormatter(status)) {
2121
+ * lnf = *ptr;
2122
+ * }
2123
+ * </pre>
2124
+ *
2125
+ * @param status Set on failure, like U_MEMORY_ALLOCATION_ERROR.
2126
+ * @return A pointer to an internal object, or nullptr on failure.
2127
+ * Do not delete the return value!
2128
+ * @stable ICU 64
2129
+ */
2130
+ const number::LocalizedNumberFormatter* toNumberFormatter(UErrorCode& status) const;
2131
+
2132
+ /**
2133
+ * Return the class ID for this class. This is useful only for
2134
+ * comparing to a return value from getDynamicClassID(). For example:
2135
+ * <pre>
2136
+ * . Base* polymorphic_pointer = createPolymorphicObject();
2137
+ * . if (polymorphic_pointer->getDynamicClassID() ==
2138
+ * . Derived::getStaticClassID()) ...
2139
+ * </pre>
2140
+ * @return The class ID for all objects of this class.
2141
+ * @stable ICU 2.0
2142
+ */
2143
+ static UClassID U_EXPORT2 getStaticClassID();
2144
+
2145
+ /**
2146
+ * Returns a unique class ID POLYMORPHICALLY. Pure virtual override.
2147
+ * This method is to implement a simple version of RTTI, since not all
2148
+ * C++ compilers support genuine RTTI. Polymorphic operator==() and
2149
+ * clone() methods call this method.
2150
+ *
2151
+ * @return The class ID for this object. All objects of a
2152
+ * given class have the same class ID. Objects of
2153
+ * other classes have different class IDs.
2154
+ * @stable ICU 2.0
2155
+ */
2156
+ UClassID getDynamicClassID() const override;
2157
+
2158
+ private:
2159
+
2160
+ /** Rebuilds the formatter object from the property bag. */
2161
+ void touch(UErrorCode& status);
2162
+
2163
+ /** Rebuilds the formatter object, ignoring any error code. */
2164
+ void touchNoError();
2165
+
2166
+ /**
2167
+ * Updates the property bag with settings from the given pattern.
2168
+ *
2169
+ * @param pattern The pattern string to parse.
2170
+ * @param ignoreRounding Whether to leave out rounding information (minFrac, maxFrac, and rounding
2171
+ * increment) when parsing the pattern. This may be desirable if a custom rounding mode, such
2172
+ * as CurrencyUsage, is to be used instead. One of {@link
2173
+ * PatternStringParser#IGNORE_ROUNDING_ALWAYS}, {@link PatternStringParser#IGNORE_ROUNDING_IF_CURRENCY},
2174
+ * or {@link PatternStringParser#IGNORE_ROUNDING_NEVER}.
2175
+ * @see PatternAndPropertyUtils#parseToExistingProperties
2176
+ */
2177
+ void setPropertiesFromPattern(const UnicodeString& pattern, int32_t ignoreRounding,
2178
+ UErrorCode& status);
2179
+ #if APPLE_ICU_CHANGES
2180
+ // rdar://126991186 (Problems with grouping in unum_ functions when specifying patterns)
2181
+ void setPropertiesFromPattern(const UnicodeString& pattern, int32_t ignoreRounding,
2182
+ const Locale& locale, UErrorCode& status);
2183
+ #endif
2184
+
2185
+ const numparse::impl::NumberParserImpl* getParser(UErrorCode& status) const;
2186
+
2187
+ const numparse::impl::NumberParserImpl* getCurrencyParser(UErrorCode& status) const;
2188
+
2189
+ static void fieldPositionHelper(
2190
+ const number::impl::UFormattedNumberData& formatted,
2191
+ FieldPosition& fieldPosition,
2192
+ int32_t offset,
2193
+ UErrorCode& status);
2194
+
2195
+ static void fieldPositionIteratorHelper(
2196
+ const number::impl::UFormattedNumberData& formatted,
2197
+ FieldPositionIterator* fpi,
2198
+ int32_t offset,
2199
+ UErrorCode& status);
2200
+
2201
+ void setupFastFormat();
2202
+
2203
+ bool fastFormatDouble(double input, UnicodeString& output) const;
2204
+
2205
+ bool fastFormatInt64(int64_t input, UnicodeString& output) const;
2206
+
2207
+ void doFastFormatInt32(int32_t input, bool isNegative, UnicodeString& output) const;
2208
+
2209
+ //=====================================================================================//
2210
+ // INSTANCE FIELDS //
2211
+ //=====================================================================================//
2212
+
2213
+
2214
+ // One instance field for the implementation, keep all fields inside of an implementation
2215
+ // class defined in number_mapper.h
2216
+ number::impl::DecimalFormatFields* fields = nullptr;
2217
+
2218
+ // Allow child class CompactDecimalFormat to access fProperties:
2219
+ friend class CompactDecimalFormat;
2220
+
2221
+ // Allow MeasureFormat to use fieldPositionHelper:
2222
+ friend class MeasureFormat;
2223
+
2224
+ };
2225
+
2226
+ U_NAMESPACE_END
2227
+
2228
+ #endif /* #if !UCONFIG_NO_FORMATTING */
2229
+
2230
+ #endif /* U_SHOW_CPLUSPLUS_API */
2231
+
2232
+ #endif // _DECIMFMT
2233
+ //eof