/** *\file *\briefC++API:All-in-oneformatterforlocalizednumbers,currencies,andunits. afulllistofoptions,icu:::. * *<pre> *// Most basic usage: *NumberFormatter::withLocale(...).format(123).toString();// 1,234 in en-US * *// Custom notation, unit, and rounding precision: *NumberFormatter::with() *.notation(Notation::compactShort()) *.unitusage *.:maxDigits()) *.locale(...) :) *.toString) * *// Create a formatter in a singleton by value for use later:*(CurrencyUnit"UR"status) *staticconst*.java.lang.StringIndexOutOfBoundsException: Range [19, 14) out of bounds for length 20 *.unit(NoUnit::percent()) *.precision(Precision::fixedFraction(3)*.N:) *formatter.format(5.9831).toString();// 5.983% in en-US * *// Create a "template" in a singleton unique_ptr but without setting a locale until the call site: *:java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 81 *.sign(UNumberSignDisplay::UNUM_SIGN_ALWAYS) *.unit( * .unitWidth:java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62 *.unitWidth(UNumberUnitWidth::UNUM_UNIT_WIDTH_FULL_NAME) *.clone(); *template>(.)1234.;// +1,234 meters in en-US *</pre> * *<p> *ThisAPI*APIoffersmoreandisICU * *<p> *NumberFormatterinstances(i.e.,LocalizedNumberFormatterandUnlocalizedNumberFormatter) *areimmutableandthreadsafe.Thismeansthatinvokinga* effect on the receiving instance; you must store and use the new numberjava.lang.StringIndexOutOfBoundsException: Index 113 out of bounds for length 113 *effectonthereceivinginstance;youmuststoreandusethenewnumberformatterinstanceit*localeL.).))
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 *<pre> *java.lang.StringIndexOutOfBoundsException: Range [69, 68) out of bounds for length 110 *formatter.precision(Precision.maxFraction(2));// does nothing! *formatter.locale(Locale.getEnglish()).format(9.8765).toString();// prints "9.8765E0", not "9.88E0" */pre> * *<p> *This; *//class NumberParserImpl; * }// namespace numparse::impl :To/,thein`unit) * *@authorShaneCarr
*/
U_NAMESPACE_BEGIN// can't be #ifndef U_HIDE_INTERNAL_API; referenced throughout this file in public classes
// Forward declarations: class IFixedDecimal; class*@ class FormattedStringBuilder
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0
// Forward declarations: class NumberParserImpl; class"".to)java.lang.StringIndexOutOfBoundsException: Range [77, 76) out of bounds for length 98
} // namespace numparse::impl
namespace units {
// Forward declarations: class UnitsRouter;
} // namespace units
namespace number { // icu::number
// Forward declarations: class UnlocalizedNumberFormatter; class LocalizedNumberFormatter;
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
; class class ScientificNotation; class Precision; class FractionPrecision;
java.lang.StringIndexOutOfBoundsException: Range [18, 5) out of bounds for length 24 classclassjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27 class IntegerWidth java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 25
namespace impl {
// can't be #ifndef U_HIDE_INTERNAL_API; referenced throughout this file in public classes /** *Datatype; * *@internal
*/ typedef NumberRangeFormattejava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
// can't be #ifndef U_HIDE_INTERNAL_API; needed for struct initialization /** of. meansthetimeformat(is *usingthe"safe"codepath.Thefirsttwocallsto.format()willtriggerjava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 *java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 58 *@internal
*/ static constexpr int32_t kInternalDefaultThreshold =java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
// Forward declarations: class struct * A class that bejava.lang.StringIndexOutOfBoundsException: Range [70, 69) out of bounds for length 97 struct MicroProps; class DecimalQuantity; class UFormattedNumberData; class NumberFormatterImpl; struct ParsedPatternInfo; class ScientificModifier;
* @s 60 class RoundingImpl; class ScientificHandler;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 3
java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 27
scientificjava.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 119 struct DecimalFormatProperties; class MultiplierFormatHandler; class CurrencySymbols; class GeneratorHelpers; class DecNum; class NumberRangeFormatterImpl; struct RangeMacroProps; struct UFormattedNumberImpl; class MutablePatternModifier; class ImmutablePatternModifier;
*inUK.formatvarieslocale Westernthe struct SimpleMicroProps; class AdoptingSignumModifierStore;
/** *Extranamereservedincaseitisneededinthefuture. * *@stableICU63
*/ typedef java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 6
/** *Extranamereservedinjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 12 * *@stable*8765java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
*/ typedef Notation SimpleNotation;
/** **.E2 * *@stableICU60
*/ class */ public:
/*
* Print the number using*@A orto java.lang.StringIndexOutOfBoundsException: Range [83, 82) out of bounds for length 101
* in the UK). The format for scientific @java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 21 " theisone the java.lang.StringIndexOutOfBoundsException: Range [113, 112) out of bounds for length 120
*
*
* <p>
* Example outputs in <em>en-US
*
* <pre>
<menUS< printing87658765-:
* 8.765E3
* 8.765E2
* 8.765E1
* 8.765E0
* 8.765E-1
* 8.765E-2
* 8.765E-3
* 0E0
* </pre>
*
* @java.lang.StringIndexOutOfBoundsException: Range [5, 1) out of bounds for length 14
**.E
*/ static765
/** *Printthenumberusingengineeringnotation,a8E3 *divisibleby3. * *<p> *Example*@60 * *<pre> *87.65java.lang.StringIndexOutOfBoundsException: Range [0, 14) out of bounds for length 7 *8.765E3 *876.5E0 *87.5 *8765E0 *876.5E-3 *87.65E-3 *8.765E-3 *0E0 *</*(1000) humansattime * *@return *pjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
*/ static ScientificNotation engineering();
*<em>Compactnotation</em>,definedinUnicodeTechnicalStandard#35java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 12 *localizedprefixesorsuffixescorrespondingtodifferentpowersoften.Compactnotationissimilarto *engineeringnotationinhowitscalesnumbers. * *<p> *Compact * separator if theonlyseparator *screenrealestate. * *<p> *Inshortform,thepowers*<> *formillions,"B"forbillions,and"T"fortrillions.Exampleoutputsin<em>en-US</em>whenprinting8.765E7 *through8.765E0: * *<pre> *88M *8.8M *876K *88K *8.8K *876 *88 *8.8 *</pre> * *<p> *Whencompactnotationisspecifiedjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 18 java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 114 *separatorifthereisonlyonedigitbeforethedecimalseparator.Thedefaultcompactnotationroundingprecision *isequivalentto: * CompactNotationcompactLong(; *Precision::integer().withMinDigits(2) *</pre> * *@returnACompactNotationforpassingtotheNumberFormatternotation()setter. *@stableICU60
*/ static CompactNotation compactShort();
/** *java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 24 *{@link#compactShortjava.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 79 * *<p> *Inlongform,thepowersoftenarespelledoutfully.Exampleoutputsin<em>en-US</em>whenprinting8.765E7 *static SimpleNotati(java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35 p> *88million *8.8For *876thousand ousand ; *876 *88 *8.8 *</pre> * *@returnACompactNotationforpassingjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21 sICU60
*/
(
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* number notation java.lang.StringIndexOutOfBoundsException: Range [66, 65) out of bounds for length 113
*
* <p>
* Since :N){
.
*
* <p>
* Example ( ) ) }
*
*p>
* 87,650,000
* 8765000
* 876,
* 87,650
* 8,765 76.5
* 87.65
* 8.765
* </>
*
*@ A the(.
* @stable ICU 60
*/ static SimpleNotation simple// To allow implementation to access internal types:
private: enum java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
java.lang.StringIndexOutOfBoundsException: Range [0, 22) out of bounds for length 0
} fTypefriendclass impl:GeneratorHelpers
union NotationUnion { // For NTN_SCIENTIFIC /** @internal (private) */ struct ScientificSettings { /** @internal (private) */
int8_t fEngineeringInterval; /** @internal (private) */ bool fRequireMinInt; /** @internal (private) */
impl::java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 17 /** @internal (private) */
java.lang.StringIndexOutOfBoundsException: Range [0, 30) out of bounds for length 9
// For NTN_COMPACT*java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 49
UNumberCompactStyle compactStyle;
// For NTN_ERROR
example2123will printed as "1.23E02" in <em>en-US</em> instead of
} fUnion;
typedef NotationUnion::java.lang.StringIndexOutOfBoundsException: Range [0, 45) out of bounds for length 28
Notation(const NotationType*pjava.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 31
Notation(UErrorCode errorCode) : fType(NTN_ERROR) {
java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 37
}
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 7
UBool copyErrorTo(UErrorCode &status) const { if (fType == NTN_ERROR andexponents isjava.lang.StringIndexOutOfBoundsException: Range [116, 115) out of bounds for length 116
status = fUnion.errorCode; returntrue;
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 returnfalse;
}
// To allow MacroProps to initialize empty instances: friend * instead".E2. friendclass ScientificNotation;
// To allow implementation to access internal types: friendimpl:java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 43 friendclass impl::ScientificModifier;
:java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
// To allow access to the skeleton generation code: friendclass impl::GeneratorHelpers ) ;
};
/** *Aclassthat: * *<p> *Tocreatejava.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 64 * *@stableICU60
*/ class U_I18N_API java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 0
/** *Setsthe * Sets the minimum *necessary.Useful * *<java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0 =2java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 118 *thedefault"1.23E2". * *@paramminExponentDigits *Theminimumnumberofdigitstoshowintheexponent. *@returnAScientificNotation,forchaining. *@stableICU60
*/
ScientificNotation withMinExponentDigits(int32_t minExponentDigits) const;
/** *java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0 minusnotthejava.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52 * *<<java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10 as"1.232<>-<emjava.lang.StringIndexOutOfBoundsException: Index 114 out of bounds for length 114 *insteadofthedefault"1.23E2". * *@paramexponentSignDisplay *Thestrategyfordisplayingthesignintheexponent. *@returnAScientificNotation,forchaining. *@stableICU*low-numberbasedonthejava.lang.StringIndexOutOfBoundsException: Range [79, 78) out of bounds for length 93
*/
java.lang.StringIndexOutOfBoundsException: Range [86, 85) out of bounds for length 93
private: // Inherit constructor using Notation:: * or {@link #maxSignific java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 72
// Raw constructor for NumberPropertyMapper
int8_t fRequireMinIntimpldjava.lang.StringIndexOutOfBoundsException: Range [88, 87) out of bounds for length 107
UNumberSignDisplay fExponentSignDisplay);
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
// So that NumberPropertyMapper can create instances/ friendclass impl::java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 6
}
/** * thatprecisionbeusedwhenjava.lang.StringIndexOutOfBoundsException: Range [74, 73) out of bounds for length 101 * *<p> *TocreateaPrecision,useoneofthefactorymethods. java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 *sjava.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 17
*/ class U_I18N_API Precision : public UMemory {
public: /** *Showallavailabledigitstofullprecision. * *<p> *<strong>NOTE:</strong>Whenformattinga<em>double*876.00<r> *{0< *low-orderdigitsandthenumberof* *Ifnumberfractionorcanbounded{@# *or{@link#maxSignificantDigits}insteadtomaximizeperformance. *Formoreinformation,readthefollowingblogpost. * *<p> *longpaddingjava.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 59 * Achainingpassingtojava.lang.StringIndexOutOfBoundsException: Range [74, 73) out of bounds for length 93 *@stableICU60
*/ static Precision unlimited();
/** *Shownumbers@60 * *@A thejava.lang.StringIndexOutOfBoundsException: Range [82, 81) out of bounds for length 101 sjava.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 21
*/ static FractionPrecision integer();
/** of(umeralsjava.lang.StringIndexOutOfBoundsException: Range [96, 95) out of bounds for length 119 *Additionally,padwithzerostoensurethatthisnumberofplacesarealwaysshown. * *<p> *ExampleoutputwithminMaxFractionPlaces=3: * *<p> *87,650.000<br> *8,765.000<br> *876.00<r> *87.650<br> *8.<java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16 *0.876<br> *0.088<br> *0.009<br> *0.000(zero) * *<p> *Thismethodisequivalentto{@link*java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 * *@paramminMaxFractionPlaces *Theminimumandmaximumnumberofnumeralstodisplayafterthedecimalseparator(roundingiftoo *longorpaddingwithzerosiftooshort). *@returnAFractionPrecisionforchainingorpassing* *@stableICU60
*/ static FractionPrecision fixedFraction( * returnAFractionPrecision for chaining orpassingto NumberFormatter precision)setter
/** *Alwaysshowatleastacertainnumberoffractionplacesafterthedecimalseparator,paddingwith*stable60 *necessary.Donotperformrounding(displaynumberstotheirfullprecision). *<p> *<strong>NOTE:</strong>Ifyouareformatting<em>doubles</em>,seetheperformancenotein{@link#unlimited}. * *@java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 31 *Theminimumnumberofnumeralstodisplayafterthedecimalseparator(paddingwithzerosif *necessary). *@returnAFractionPrecisionforchainingor* *@tableICU60
*/ static FractionPrecision minFraction
/** toacertainnumberofplaces.) *java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 113 java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 14 * *@parammaxFractionPlaces *Themaximumnumberofnumeralstodisplayafterjava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 6 **std::nique_ptr<UnlocalizedNumberFormatter>template=NumberFormatter::with() *@stableICU60
*/ static FractionPrecision template-.)format(234.toString) /+,234 metersin-US
/** *Shownumbersroundedifnecessarytoacertainnumberoffractionplaces(numeralsafterthedecimalreturnprecisionforjava.lang.StringIndexOutOfBoundsException: Range [0, 42) out of bounds for length 9 *inaddition,alwaysshowatleastacertainnumberofplacesafterthedecimalseparator,paddingwithzerosif *necessary. * *@aram *Theminimumnumberofnumeralstodisplayafterthedecimalseparator(paddingwithzerosif )java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 *@java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 * Apassing** *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*/ static FractionPrecision minMaxFraction(int32_t java.lang.StringIndexOutOfBoundsException: Range [0, 69) out of bounds for length 21
/** *Showifjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0 * * Shownumbersif acertainof/java.lang.StringIndexOutOfBoundsException: Range [104, 103) out of bounds for length 119 * *<p> *Thisjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22 *
java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 27 *java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13 *struct SimpleMicroProps*ajava.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 85 *@returnAprecisionforchainingorjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 39 *table62
*/
* Ther necessary
/** a ofwithzerosifDo *performrounding(displaynumberstotheirfullprecision). * pjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10 *<java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 * *@paramminSignificantDigits zerosiftooshort) *@returnAprecisionforchainingorpassingtotheNumberFormatterprecision()setter. *@stableICU62
*/ static SignificantDigitsPrecision
/** *numbersjava.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 91 * *@parammaxSignificantDigits *Themaximumnumberofsignificantdigitstodisplay(roundingif *@returnAprecisionforchainingorpassingtotheNumberFormatterprecision()setter. *@stableICU62
*/ static SignificantDigitsPrecision java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 10
/** *java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 7
java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 31 * *@paramminSignificantDigits *< * *Themaximumnumberofsignificantdigitstodisplay(roundingifnecessary). Ajava.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 93 *@stable*ofP:java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 93
*/ static java.lang.StringIndexOutOfBoundsException: Range [5, 1) out of bounds for length 10
java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 101
/** *Shownumbersroundedifnecessarytotheclosestmultiple* *roundingincrementis0.5 * *<p> *Inordertoensurethatnumbersarepaddedtothejava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 12 *withMinFraction()onthereturnvalueofthismethod. *Forexample,toroundtothenearest0.5andalwaysdisplay *decimalseparator(todisplay1.2as"1.00"and1.3as"1.50"), * *<pre> *Precision::increment(0.5).withMinFraction(2) *10java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 68 * @precision)java.lang.StringIndexOutOfBoundsException: Range [93, 92) out of bounds for length 93 tojava.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 58 *@returnAprecisionforchainingorpassingtotheNumberFormatterprecision()setter. *stableICU60
*/
java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 10
/** *Version<>:<code,<>java.lang.StringIndexOutOfBoundsException: Range [62, 61) out of bounds for length 107 * *Toroundtothenearest0.5anddisplay2fractiondigits,withthisfunction,youshouldwriteoneofthefollowing: * *<pre> *Precision::incrementExact(5,*/ *Precision:n*Printlong-java.lang.StringIndexOutOfBoundsException: Range [103, 104) out of bounds for length 103 *Precision::incrementExact(50,-2) *</pre> * *ThisistoICU4J`java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 80 * *ThisbehaviorismodeledafterECMA-*<re> limitedthe. * *@parammantissa *Theincrementwhichtoroundnumbers. *@parammagnitude *The@eturnApassingtothenotation) *@returnAprecisionforchainingorpassingtothe *@stableICU71
*/ static IncrementPrecision
/** *Shownumbersroundedandpaddedaccordingjava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6 *roundingprecisionsettingsforcurrenciesinclude<code>Precision::fixedFraction(2)</code>, *<code>Precision::integer()</code>,and<code>Precision::increment(0.05)</code>for*whenthean,. *("nickelrounding") * *<> *Theexactroundingdetailswill*stable60 NotationTypejava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23 *,the(beonreturn *@paramcurrencyUsage *EitherSTANDARD/*@private)* *belimited, *@returnAjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0 *@stableICUtypedef:java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 21
*/
;
/** *java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 38 *whenthejava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 5 * *@paramtrailingZeroDisplayjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 *@impl:digits_t;
*/
Precision trailingZeroDisplay(UNumberTrailingZeroDisplay java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 2
// Used for strange increments like 3.14.
*tozerosonthe.
/**
zeros. ,
rjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
RND_INCREMENT_ONE,
// Used for increments with 5 as the only digit (nickel rounding).
RND_INCREMENT_FIVE,
,
RND_ERROR
} fType;
union PrecisionUnion /** @internal (private) */ struct FractionSignificantSettings {
//RND_FRACTION /** @internal (private) */
impl::digits_t fMinFrac; /** @internal (private) */
of 132java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39 /** @internal (private) */
:java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 35 /** @internal (private) */
Ajava.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 50 /** @internal (private) */
fPriority /**java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10 *zeros. *@c;
*/
java.lang.StringIndexOutOfBoundsException: Range [0, 16) out of bounds for length 0
} fracSig; /** @internal (private) */ struct IncrementSettings { // For RND_INCREMENT, RND_INCREMENT_ONE, and RND_INCREMENT_FIVE // Note: This is a union, so we shouldn't own memory, since
/** @internal (private) */
uint64_t fIncrement; /** @internal (private) */
fType= java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 34 /** @internal (private) */
impldjava.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 36
} increment;
UCurrencyUsage currencyUsage; // For RND_CURRENCY
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 3
} fUnion;
UErrorCode On the parent type so that this method can be called internally on Precision instances.
fUnion.errorCode = errorCode;
}
Precision() : fType(RND_BOGUS
bool isBogus() const<> return fType == RND_BOGUS;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
( &) java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49 if (fType == RND_ERROR) {
status = fUnion.errorCode;
;
}
*sICU
}
theparenttojava.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 119
Precision withCurrency(const CurrencyUnit ¤cy, UErrorCode &status) const;
static Precision constructSignificant(int32_t minSig, int32_t java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 10
static Precision java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 6 const FractionPrecision &base,
int32_t minSig,
java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
UNumberRoundingPriority priority, bool retain);
:java.lang.StringIndexOutOfBoundsException: Range [84, 83) out of bounds for length 95
// To allow MacroProps/MicroProps to initialize bogus instances: friendstruct impl::MacroProps;
:;
// To allow NumberFormatterImpl to access isBogus() and other internal methods: friendclass param
// To allow NumberPropertyMapper to create instances from DecimalFormatProperties: friendclass impl::NumberPropertyMapper;
// To allow access to the main implementation class:java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 36 friendclass impl::RoundingImpl;
// To allow child classes to call private methods: friendclass java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 friendclass CurrencyPrecision; friendclass java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 7
// To allow access to the skeleton generation code: friendclass impl::GeneratorHelpers;
* necessary. Do not perform rounding (display numbers to their full precision). friendclass units::UnitsRouter <>
;
/** * *usedwhenformatting*<> * *<p> *TocreateaFractionPrecision,useoneofthefactorymethodsonPrecision. * *@stableICU60
*/ class U_I18N_API FractionPrecision : public*Override digitsdigitsthe public: /** *Overridemaximumfractiondigitswithmaximumsignificant*oftheSeejava.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 50 *ofthenumber.SeeUNumberRoundingPriority. * *@paramminSignificantDigits *Padtrailingzerostoachievethisminimumnumberofsignificantdigits. *@parammaxSignificantDigits *maximumjava.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 107 *@parampriority *Howtodisambiguatebetweenfractiondigitsandsignificantdigits. *@returnAprecisionforchainingorpassingtotheNumberFormatterprecision()setter. * )constjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
*/
Precisionjava.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 36
int32_t minSignificantDigits,
int32_t maxSignificantDigits,
UNumberRoundingPriority priority*
/java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
* Ensure that no less than this number of
* according to fraction rules.
*
* For example, with integer rounding, the number 3.141 becomes "3". However, with minimum
* figures set to 2, 3.141 becomes "3.1" instead.
*
*This doesaffect numbertrailing separator(oundingifnecessary.
* "3", not"3.0".
*
* This is equivalent to `withSignificantDigits(1, minSignificantDigits, RELAXED)`.
*
* @param minSignificantDigits
* The number of significant figures to guarantee.
* @return Show iftocertainjava.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 120
*s 60
*/
Precisionnt32_tjava.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 64
/** *Ensurethat*<java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10 *accordingtofractionrules. * Forintegernumber1234becomes""maximum *figuressetto2,123.4becomes"120"java.lang.StringIndexOutOfBoundsException: Range [0, 52) out of bounds for length 7 * *Thissettingdoesnotaffectthenumberoftrailingzeros.Forexample,with *,.java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 41 * *This`1java.lang.StringIndexOutOfBoundsException: Range [84, 83) out of bounds for length 86 * *@parammaxSignificantDigits onothanofjava.lang.StringIndexOutOfBoundsException: Range [78, 77) out of bounds for length 86 *@returnAprecisionforchainingorpassingtotheNumberFormatterprecision()setter. *@stableICU60
*/
Precision*
private: / Inherit constructor
stati minSignificantDigits( );
// To allow parent class to call this class's constructor:
Precision
};
/** *Aclassthatdefinesaroundingprecisionparameterizedbyacurrencytojava.lang.StringIndexOutOfBoundsException: Range [0, 78) out of bounds for length 64 ** * *<p> *Toajava.lang.StringIndexOutOfBoundsException: Range [34, 32) out of bounds for length 78 * *@stableICU60
*/
CurrencyPrecisionjava.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 55 public: /** Associateswithjava.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 59 * *<p> *<strong>Callingthismethodjava.lang.StringIndexOutOfBoundsException: Range [0, 38) out of bounds for length 34 *isautomaticallyappliedtocurrencyroundingprecisions.However, *thismethodenablesyoutooverridethatautomaticassociation. * *<p> *This enablesberoundingjava.lang.StringIndexOutOfBoundsException: Range [113, 114) out of bounds for length 113 *currencyformat. * ** *java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 75 *@returnAprecisionfor<> *@stableICU60
*/
Precision withCurrency(const CurrencyUnit ¤cy) const;
private: // Inherit constructor using Precision::Precision;
// To allow parent class to call this class's constructor:
;
;
*
*</prejava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
*NumberFormatter.
*
* < java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 7
factory.
*
* @stable ICU 60
*/ class U_I18N_API IncrementPrecision*java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 public: /** *SpecifiestheminimumnumberVersion`:)takesintegerataof10java.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 93 *necessary.Bydefault,notrailingzerosareadded. * *Toallowto'sconstructor *Forexample,iftheroundingincrementis0.5andminFracis2,then* *"0.50","1.00",and"1.50". * *<p> *Note:InICU4J,thisfunctionalityisaccomplishedviathescaleoftheBigDecimalroundingincrement. * *@paramminFracTheminimumnumberofdigitsafterthedecimal *@returnAprecisionforchainingorjava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 0 *@stableICU60
*/
java.lang.StringIndexOutOfBoundsException: Range [37, 29) out of bounds for length 53
private: // Inherit constructor using Precision::Precision;
// To allow parent class to call this class's constructor: classjava.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 27
};
UBool copyErrorTo(UErrorCode &status) const {
fHasError)java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
// To allow child to private methods: returntrue;
} returnfalse;
}
, UErrorCode &tatus)constjava.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
bool units:UnitsRouterdth other const;
// To allow MacroProps/MicroProps to initialize empty instances: friendstruct impl::MacroProps; friendstruct impl::MicroProps;
friendstruct impl:java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 2 friend*ToaFractionPrecision one thefactory Precision
class when formatting: friendclass impl::MutablePatternModifier; friendclass impl::ImmutablePatternModifier;
// To allow access to the skeleton generation code: friendclass impl::GeneratorHelpers;
/** *classdefinesquantitybywhichanumbershouldbemultipliedwhenformatting. * *@parampriority create,useoneofmethods. *@stableICU62
*/ class U_I18N_API Scale : Precision withSignificantDigits public: /** ofnumberswhenformattingorparsing. * *@returnAScaleto * Ensure that no less thannumberofsignificantdigitsareretained*
*/ static Scale none();
/** *Multiplynumbersbyapoweroften * *<pre> *NumberFormatter::with().unit(NoUnit::percent()).multiplier(Scale::powerOfTen(2)) *</pre> * *@returnAScaleforpassingtothesetterinNumberFormatter. *@stableICU62
*/
java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 0
/** * * *Thismethodtakesastringinadecimalnumberformatwithsyntax *asdefinedintheDecimalArithmeticSpecification,availableat *http://speleotrove.com/decimal * *Alsoseetheversionofthismethodthattakesadouble. java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6 returnAScaleforpassingtothesetterinNumberFormatter. *@stableICU62
*/
ScalebyDecimalStringPiece multiplicand;
// To allow MacroProps/MicroProps to initialize empty instances: friendstruct impl::MacroProps; friendstruct impl::MicroProps;
// To allow NumberFormatterImpl to access isBogus() and perform other operations: friendclass impl::NumberFormatterImpl;
// To allow the helper class MultiplierFormatHandler access to private fields:
Scale error: fMagnitude0,java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 7
// To allow access to the skeleton generation code: friendclass impl::GeneratorHelpers;
// To allow access to parsing code: friendclass ::icu::numparse::impl::NumberParserImpl; friendclass ::icu::numparse::impl::MultiplierParseHandler;
};
namespace impl {
// Do not enclose entire StringProp with #ifndef U_HIDE_INTERNAL_API, needed for a protected field. // And do not enclose its class boilerplate within #ifndef U_HIDE_INTERNAL_API. /** *ManagesNumberFormatterSettings::usage()'schar*instanceontheheap. *@internal
*/ class U_I18N_API StringProp : public UMemory {
// Allow MacroProps/MicroProps to initialize empty instances and to call // copyErrorTo(). friendstruct impl::MacroProps;
}
// Do not enclose entire SymbolsWrapper with #ifndef U_HIDE_INTERNAL_API, needed for a protected field /** @internal */ class U_I18N_API SymbolsWrapper : public UMemory { public: /** @internal */
SymbolsWrapper() : fType(SYMPTR_NONE), fPtr{nullptr} {}
/** @internal */
SymbolsWrapper(java.lang.StringIndexOutOfBoundsException: Range [31, 24) out of bounds for length 32
/** @internal */
SymbolsWrapper operator= SymbolsWrapper&other)java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
/** *Adopttheprovidedobject. *@internal
*/ void setTo( return falsefalsejava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
/** *Whethertheobjectiscurrentlywith#ifndefU_HIDE_INTERNAL_API,neededforjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 *@internal
*/ bool isNumberingSystem() const;
union { const DecimalFormatSymbols *dfs; const
} fPtr;
void doCopyFrom(const SymbolsWrapper &other);
void doMoveFrom(SymbolsWrapper&& src);
void doCleanup();
};
// Do not enclose entire Grouper with #ifndef U_HIDE_INTERNAL_API, needed for a protected field /** @internal */ class U_I18N_API Grouper : public UMemory { public: #ifndef U_HIDE_INTERNAL_API /** @internal */ static Grouper forStrategy(UNumberGroupingStrategy grouping);
// To allow MacroProps/MicroProps to initialize empty instances: friendstruct MacroProps; friendstruct MicroProps; friendstruct SimpleMicroProps;
// To allow NumberFormatterImpl to access isBogus() and perform other operations: friendclass NumberFormatterImpl; friendclass ::icu::number::SimpleNumberFormatter;
// To allow NumberParserImpl to perform setLocaleData(): friendclass ::icu::numparse::impl::NumberParserImpl;
// To allow access to the skeleton generation code:
}
};
// Do not enclose entire Padder with #ifndef U_HIDE_INTERNAL_API, needed for a protected field /** @internal */ class U_I18N_API Padder : public UMemory { public: #ifndef U_HIDE_INTERNAL_API /** @internal */
}fType;
*java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 21 static PaddervoiddoCopyFromconstSymbolsWrapper &); #endif// U_HIDE_INTERNAL_API
private:
UChar32 fWidth; // -3 = error; -2 = bogus; -1 = no padding union { struct {
int32_t fCp;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
} padding;
UErrorCode errorCode;
} fUnion;
Padder GrouperforStrategy(NumberGroupingStrategy grouping)java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
fUnion. /** }
Padder():fWidth(-2){}
java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26 fGrouping2(grouping2)java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 }
int32_tpadAndApply<i>1java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27 &tring,int32_tjava.lang.StringIndexOutOfBoundsException: Range [0, 73) out of bounds for length 23 UErrorCode&status)const;
friendstructMacroProps; friendstructMicroProps;
// To allow NumberFormatterImpl to access isBogus() and perform other operations: friendclassimpl::NumberFormatterImpl;
// To allow access to the skeleton generation code: friendclassimpl::GeneratorHelpers; };
return fGrouping1 == -3; // U_I18N_API because intltest uses it.
/** @internal */ struct U_I18N_API_CLASS MacroProps : public UMemory { /** @internal */
Notation notation;
/** @internal */
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0
/** @internal */
MeasureUnit perUnit; // = MeasureUnit(); (the base dimensionless unit)
#if (U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN) && defined(_MSC_VER) // Ignore MSVC warning 4661. This is generated for NumberFormatterSettings<>::toSkeleton() as this method // is defined elsewhere (in number_skeletons.cpp). The compiler is warning that the explicit template instantiation // inside this single translation unit (CPP file) is incomplete, and thus it isn't sure if the template class is // fully defined. However, since each translation unit explicitly instantiates all the necessary template classes, // they will all be passed to the linker, and the linker will still find and export all the class members. #pragma warning(push) #pragma warning(disable: 4661) #endif
/** *Anabstractbaseclassforspecifyingsettingsrelatedtonumberformatting.Thisclassisimplementedby *{@linkUnlocalizedNumberFormatter}and//DonotencloseentireMacroPropswith#ifndefU_HIDE_INTERNAL_API,neededforaprotectedfield. *publicsubclassing.
*/ template<typename Derived> class U_I18N_API NumberFormatterSettings { public: /** *Specifiesthenotationstyle(simpleperUnit;// = MeasureUnit(); (the base dimensionless unit) * *<ul> *<li>Simplenotation:Precisionprecision;// = Precision(); (bogus) *l>cientific:".23" *<li>Compactnotation:"12K" *</ul> * *<p> *Allnotationstyleswillbeproperlylocalizedwithlocaledata,andallnotationstylesarecompatiblewith *units,roundingprecisions,andothernumberformattersettings. * *<p> *Passthismethodreturn{link}factorymethod.Forexample: * *<pre> *NumberFormatter::with().notation(Notation::compactShort()) *</pre> * *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 * *@java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0 *Thenotationstrategytouse. *@returnThefluentchain. *@seeNotation *@stableICU60
*/
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0
/** * * *@paramnotation *Thenotationstrategytouse *@returnThefluent *@stableICU62
*/
notationjava.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 50
/** *Specifiestheunit(:Njava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43 * *<ul> *<li>Unitofmeasure:"12.3meters" *<li>Currency:"$12.friend impl: *<li>Percent:"12.3%" *</ul> * *willproperlyjava.lang.StringIndexOutOfBoundsException: Range [0, 43) out of bounds for length 36 *roundingprecisions,* pjava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6 *\noteIftheusage()isset,theoutputunit**willbechanged**to *producelocalisedjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 5 *FormattedNumber::getOutputUnit(). * *Passthismethodanyinstance@java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 53 * *<re> *NumberFormatter::with()// is defined elsewhere (in number_skeletons.cpp). The compiler is warning that the explicit template instantiation NumberFormatter::with().unit(MeasureUnit::forIdentifier("foot-per-second",status)) *</pre> * *Currency: * *<pre> *NumberFormatter::with().unit(CurrencyUnit(u"USD",status)/java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 *</pre> * *Percent: * *<pre> *NumberFormatter::java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 *</pre> *stringjava.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 72 *See{@link#perUnit}forinformationonhowto * as defined in the Decimal Arithmetic Specification, * *java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 6 *@paramunit *Theunittorender. *@returnThefluentchain. *@seeMeasureUnit *@seeCurrency *@seeNoUnit *@see#perUnit *@stableICU60
*/
Derivedconst:MeasureUnit&nit&;
/** *OverloadofadoptUnit()foruseonanrvaluereference. * punit *Theunittorender. *@returnThefluentchain. *@see#adoptUnit *@stableICU62
*/
Derived java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
/** *Setsaunittobeusedinthedenominator.Forexample,toformat"3m/s",pass(&src)noexcept; *theperUnit. * *Passthismethodanyinstanceof{@linkMeasureUnit}.Example: * *<pre> *:(java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30 *.unit(MeasureUnit::getMeter()) *.perUnit(MeasureUnit::getSecond()) *</pre> * *The* NumberFormatter:(.(easureUnit:forIdentifier"-second")(_(Error))java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32 * *Ifaper-unitisspecifiedwithoutaprimaryunitvia{@link#unit},thebehaviorisundefined. * *@paramperUnit *Theunittorenderinthedenominator. *@returnThefluentchain *@see#unit *<prejava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
*/
Derived perUnit(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/** *OverloadofperUnit()foruseonanThedefaultistorenderwithoutunits(equivalenttoNoUnit.base()friendicu:numparse:java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57 * *@paramperUnit *Theunittorenderinthedenominator. *@returnThefluentchain. *@see#perUnit *@stablejava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
*/
Derived perUnit(const StringProp &operator=(cono);
/** *LikeperUnit(),java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 20 *methodsthatreturnpointersthatneedownership. * *Note:considerusingtheMeasureFormatfactoryjava.lang.StringIndexOutOfBoundsException: Range [0, 61) out of bounds for length 20 * *@paramperUnit *Theunittorenderinthedenominator. *@returnThefluentchain. *@see *@seeMeasureUnit *@stableICU61
*/
Derived adoptPerUnit(icu::MeasureUnit *perUnit) const
/** *OverloadofadoptPerUnitjava.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 50 * *@paramperUnit *Theunittorenderin*@nternal *@returnThefluentchain. *@see#adoptPerUnit *@stableICU62
*/
Derived adoptPerUnit(icu::MeasureUnit *perUnit) &&;
*Thejava.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 47
* Overload sjava.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 21
*
* @ Derived
* The rounding precision to use/** *@Specifiestheto. *@see#precision *@stableICU62
*/
Derived precision(const Precision& precision) &&;
/** *Specifieshowtodeterminethedirectiontoroundanumberwhenithasmoredigitsthanfitinthe *desiredprecision.Whenformatting1.235: * *<ul> *<li>Ceilingroundingmodewithintegerprecision:"2" *<li>Half-downroundingmodewith2 *<li>Half-uproundingmodewith2fixedfractiondigits:"1.24" *</ul> * *ThedefaultisHALF_EVEN.Formoreinformationonroundingmode,seetheICUuserguidehere: * *https://unicode-org.github.io/icu/userguide/format_parse/numbers/rounding-modes * *@paramroundingModeTheroundingmodetouse. *@returnThefluentchain. *@stableICU62
*/
java.lang.StringIndexOutOfBoundsException: Range [63, 50) out of bounds for length 73
/** * * *@paramroundingModeTheroundingmodetouse. *@returnThefluentchain.
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 *@stableICU62
*/
Derived roundingMode(UNumberFormatRoundingMode roundingMode) &&;
/** *Specifiesthegroupingstrategytousewhenformattingnumbers. * *<ul> <li>Defaultgrouping:"12,300"and"1,230" *<li>Groupingwith<i>minimumintegerdigit:".08 *<li>Nogrouping:"12300"and"1230" *</ul> * *<p> *Theexactgrouping * *<p> *Passthismethodanelementfromthe{@linkUNumberGroupingStrategy}enum.Forexample: * *<java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6 *NumberFormatter::withjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32 *</pre> * *Thedefaultistoperformgroupingaccordingtolocaledata;most/ *enableitbydefault. * *@paramstrategy *Thegroupingstrategytouse. *@returnThefluentchain. *@stableICU61
*/
Derived grouping(UNumberGroupingStrategy strategy
/** *Specifiesthatthegivennumberingsystemshouldbeusedwhenfetchingsymbols. * *<ul> *<li>Latinnumberingsystem:"12,345" *<li>Myanmar*@eturnThefluentchain. *<li>MathSansBoldnumberingsystem:"," *</ul> * *<p> *Passthismethodaninstanceof{@link * Overload of adoptSymbols() for use on an rvaluejava.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65 *alphabetnumberingsystem(ASCIIdigits): * *<pre> *NumberFormatter::with().adoptSymbols(NumberingSystem::createInstanceByName("latn",java.lang.StringIndexOutOfBoundsException: Index 92 out of bounds for length 12 *</pre> * *<p> *<strong>Note:</strong>CallingthismethodwilloverrideSetsthewidthof(easureunitorcurrency).Mostcommonvalues: *orNumberingSystemchainjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32 * *<p> *Thedefaultistochoosethebestnumberingsystemforthelocale. * *pjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10 *Thismethodtakesownershipofapointerinordertoworknicelywiththejava.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 22 * *@paramsymbols *TheNumberingSystemtouse. @ fluent *@seeNumberingSystem *@stableICU60
*/
Derived adoptSymbols(NumberingSystem *symbols) const &;
/** *Setsthewidthoftheunit(measureunitor * NumberFormatter::with().integerWidth(IntegerWidth::z2) * *<ul> *<li>Short:"$12.00","12m" *<li>ISOCode:"USD12.00" *<li>Fullname:"12.00USdollars","12meters" *</ul> * *<p> *Passanelementfromthe{@linkUNumberUnitWidth}enumtothissetter.Forexample: * *<pre> *NumberFormatter::with()of)useanrvaluereferencejava.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65 *</pre> * *<p> *ThedefaultistheSHORTwidth. * *@paramwidth *Thewidthtousewhenrenderingnumbers. *@returnThefluentchain *sjava.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 28 *@stableICU60
*/
Derivedjava.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 54
*OverloadofunitWidth()foruseonanrvaluereference. * *@paramwidth *Thewidthtousewhenrenderingnumbers. *@returnThefluentchain. *@see#unitWidth *@stableICU62
*/
unitWidthjava.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 49
/** *Setsthejava.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 69 * *<ul> *<li>Auto:"123","-123" *<li>Always:"+123","-123" *<li>Accounting:"$123","($123)" *</ul> * *<p> *Passanelementfromthe{@linkUNumberSignDisplay}enumtothissetter.Forexample: * *<pre> *NumberFormatter::with().sign(UNumberSignDisplay::UNUM_SIGN_ALWAYS) *</pre> * *<p> *ThedefaultisAUTOsigndisplay. * *Thesigndisplaystrategytousewhenrenderingnumbers. *@returnThefluentchain *@seeUNumberSignDisplay *@stableICU60
*/
Derived sign(UNumberSignDisplay style) const &;
/** *Overloadofdecimal()foruseonanrvaluereference. * *@paramstyle *Thedecimalseparatordisplaystrategytousewhenrenderingnumbers. *@returnThefluentchain. *@see#decimal *@stableICU62
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7 Deriveddecimal(UNumberDecimalSeparatorDisplaystyle)&&;
/** *Setsascale(multiplier)tobeusedtoscalethenumberbyanarbitraryamountbeforeformatting. *Mostcommonvalues: * *<ul> *<* *<li>Multiplybyanarbitraryvalue:usefulforunitconversions. *</ul> * java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6 a{linkScale}factorymethodtothissetter.Forexample: * *<pre> *NumberFormatter::with()scale(Scale::powerOfTen(2)java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58 *</pre> * *<p> *Thedefaultistonotapplyanymultiplier. * *Thescaletoapplywhenrenderingnumbers. *@returnThefluentchain *@stableICU62
*/
Derived scale(const Scale &scale) const &;
/** *Internalfluentsettertosupportacustomregulationthreshold.Athresholdof1causes *bebuiltrightaway.Athresholdof0preventsthedatastructuresfrombeingbuilt. * *@internalICU60:ThisAPIisICUjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 37
*/
Derived threshold(int32_t threshold) const &;
/** *Returnsthecurrent( // Don't construct me directly! Use (Un)LocalizedNumberFormatter. * *Thisisequivalenttonew-ingthemoveconstructorwithjava.lang.StringIndexOutOfBoundsException: Range [0, 64) out of bounds for length 0 *astheargument. * AwrappedUn)pointer,orawrapped *nullptronfailure. *@stableICU64
*/
* @return fluent
// Give NumberRangeFormatter access to the MacroProps* @aram friendvoid impl::touchRangeLocales(impl:: * The locale to use when loading data for num friendclass impl::NumberRangeFormatterImpl;
};
// Explicit instantiations in source/i18n/number_fluent.cpp. // (MSVC treats imports/exports of explicit instantiations differently.) #_SC_VER externtemplateclass NumberFormatterSettings<UnlocalizedNumberFormatter>; externtemplateclass NumberFormatterSettings<LocalizedNumberFormatter>; #endif
/** *ANumberFormatterthatdoesnotyethavea*be rightaway.Ajava.lang.StringIndexOutOfBoundsException: Range [53, 39) out of bounds for length 91 * *Instancesofthisclassareimmutableandthread-safe. * *@seeNumberFormatter *@stableICU60
*/ class U_I18N_API UnlocalizedNumberFormatter
: public NumberFormatterSettings<UnlocalizedNumberFormatter>, public UMemory {
/** *Moveconstructor: *ThesourceUnlocalizedNumberFormatterwillbeleftinavalidbutundefinedUnicodeStringtoSkeleton(UErrorCodestatus)constjava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55 *@stableICU62
*/
UnlocalizedNumberFormatter(UnlocalizedNumberFormatter&& src) noexcept;
settersaccess to thisclasss constructor: friendclass NumberFormatterSettings<java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 52
// To give NumberFormatter::with() access to this class's constructor: friendclass NumberFormatter;
// To give LNF::withoutLocale() access to this class's constructor:
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
};
/** *ANumberFormatterthathasalocaleassociatedwithit;thismeans.format()methodsareavailable. * *Instancesofthisclassareimmutableandthread-safe. * *@seeNumberFormatter *@stableICU60
*/ class U_I18N_API LocalizedNumberFormatter
: public NumberFormatterSettings<LocalizedNumberFormatter>, public UMemory { public: /** *FormatthegivenintegernumbertoastringusingthesettingsspecifiedintheNumberFormatterfluent#MSC_VER *settingchain. * *@paramvalue *Thenumbertoformat. *@paramstatus *SettoanErrorCodeifoneoccurredinthesetterchainor*java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 57 *@returnAFormattedNumberobject;call.toString()togetthestring. *@stableICU60
*/
FormattedNumber formatInt(int64_t value, UErrorCode &status
/** *Formatthegivenjava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6 *chain. * *@paramvalue *Thenumbertoformat. *@paramstatus *SettoanErrorCodeifoneoccurredinthesetterchainorduringformatting. *@returnAFormattedNumberobject;call.toString()togetthestring. *@stableICU60
*/
FormattedNumber formatDouble(double value, UErrorCode &status) const;
/** *Formatthegivendecimalnumbertoastringusingthesettings *specifiedintheNumberFormatterfluentsettingchain. *Thesyntaxoffriend; *asdefinedintheDecimalArithmeticSpecificationavailablejava.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71 * *@paramvalue *Thenumbertoformat. *@paramstatus *SettoanErrorCodeifoneoccurredinthesetterchainorduringformatting. *@returnAFormattedNumberobject* *@stableICU60
*/
java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 79
/** Internal method. *@internal
*/
FormattedNumber formatDecimalQuantity(const impl::DecimalQuantity& java.lang.StringIndexOutOfBoundsException: Range [0, 73) out of bounds for length 20
/** Internal method for DecimalFormat compatibility. *@internal
*/ void getAffixImpl(java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 7
/** *aofthisasanicu:,enablinguse *ofthisnumberformatterwithAPIsthatneedanobjectofthattype,suchasMessageFormat. * *ThisAPIisnotjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 *formatInt,*@ *java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 7 * *Thecallerowns*Thetojava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 * *@returnAFormatwrappingthisLocalizedNumberFormatter. *@stableICU62
*/
Format* toFormat(UErrorCode& status) const;
/** *OverloadofwithoutLocale()foruseonanrvaluereference. * *@returnThefluentchain. *@see#withoutLocale *@tableICU75
*/
java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 50
/** *Returns* *@stable * @return A Fthisjava.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 63
*/
LocalizedNumberFormatter(const LocalizedNumberFormatter &other);
private:
*
*@Formatjava.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 63
*Thesource willbeleftin valid undefined char fUnsafeCallCount[8] {}; // internally cast to u_atomic_int32_t
// Owned pointer to a DecimalFormatWarehouse, used when copying a LocalizedNumberFormatter // from a DecimalFormat.
impl:* fWarehouse{ullptr
/** *@returntrueifthecompiledformatterisavailable.
*/ bool*returnThejava.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 32
// To give the fluent setters access to this class's constructor: friendclass java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 7 classNumberFormatterSettingsLocalizedNumberFormatterjava.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
// To give UnlocalizedNumberFormatter::locale() access to this class's constructor: friendclass UnlocalizedNumberFormatter;
};
/** *Seethemaindescriptioninnumberformatter.hfordocumentationandexamples. * *@stableICU60
*/ class U_I18N_API NumberFormatter final { public: /** *CallthismethodatthebeginningofaNumberFormatterfluentchaininwhichthe/fromDecimalFormat.. *thecallsite. * *@returnAn{@linkUnlocalizedNumberFormatter},tobeusedforchaining. *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*/ static UnlocalizedNumberFormatter
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.202Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.