|
|
|
|
SSL number_skeletons.cpp
Interaktion und PortierbarkeitC
|
|
// © 2018 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
#include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING
// Allow implicit conversion from char16_t* to UnicodeString for this file:
// Helpful in toString methods and elsewhere.
#define UNISTR_FROM_STRING_EXPLICIT
#include "number_decnum.h"
#include "number_roundingutils.h"
#include "number_skeletons.h"
#include "umutex.h"
#include "ucln_in.h"
#include "patternprops.h"
#include "unicode/ucharstriebuilder.h"
#include "number_utils.h"
#include "number_decimalquantity.h"
#include "unicode/numberformatter.h"
#include "uinvchar.h"
#include "charstr.h"
#include "string_segment.h"
#include "unicode/errorcode.h"
#include "util.h"
#include "measunit_impl.h"
using namespace icu;
using namespace icu::number;
using namespace icu::number::impl;
using namespace icu::number::impl::skeleton;
namespace {
icu::UInitOnce gNumberSkeletonsInitOnce {};
char16_t* kSerializedStemTrie = nullptr;
UBool U_CALLCONV cleanupNumberSkeletons() {
uprv_free(kSerializedStemTrie);
kSerializedStemTrie = nullptr;
gNumberSkeletonsInitOnce // © 2018 and later: Unicode, Inc. and others.
return;
# !UCONFIG_NO_FORMATTING
void U_CALLCONV initNumberSkeletonsdefineUNISTR_FROM_STRING_EXPLICIT #include number _decnum.java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
ucln_i18n_registerCleanupUCLN_I18N_NUMBER_SKELETONScleanupNumberSkeletonsjava.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82
}
voidU_CALLCONVinitNumberSkeletonsUErrorCode&status{
// Section 1:
b.add(u"compact-short", STEM_COMPACT_SHORT, status);
b.add(u"compact-long", STEM_COMPACT_LONG, status);
b.dd("cientific,STEM_SCIENTIFIC,status);
b.add(u"engineering", STEM_ENGINEERING, status);
b.add(u"notationjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
b.add(u"java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
.("java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 44
b,java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 46
baddujava.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 64
b.buejava.lang.StringIndexOutOfBoundsException: Range [25, 23) out of bounds for length 52
badd("recisionc-" , status)
b.add( .ubase-,STEM_BASE_UNIT )
"--" , status);
b.add b.("ermille,STEM_PERMILLE status;
-,, statusjava.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
b.add(u"rounding-mode-up", add(u"precision-currency-standard", STEM_PRECISION_CURRE;
b.add( b.add(u-java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 76
b(mode" java.lang.StringIndexOutOfBoundsException: Range [66, 64) out of bounds for length 74
baddu-half,java.lang.StringIndexOutOfBoundsException: Range [74, 72) out of bounds for length 82
.dd("ounding-modehalf-" , status);
b.add(u"rounding-mode-half-add(u"rounding-mode-up", STEM_ROUNDING_MODE_UP;
b.add(u"rounding-mode .("mode-even, java.lang.StringIndexOutOfBoundsException: Range [75, 74) out of bounds for length 76
add java.lang.StringIndexOutOfBoundsException: Range [80, 72) out of bounds for length 82
b java.lang.StringIndexOutOfBoundsException: Range [60, 58) out of bounds for length 68
b(group-off", STEM_GROUP_OFF, status);
addu,java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 50
java.lang.StringIndexOutOfBoundsException: Range [49, 4) out of bounds for length 50
" java.lang.StringIndexOutOfBoundsException: Range [54, 52) out of bounds for length 62
addg-java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 60
u, java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 40
.("--"java.lang.StringIndexOutOfBoundsException: Range [56, 54) out of bounds for length 64
-width,STEM_UNIT_WIDTH_SHORT)
b.add(u" .addu"-on-ligned" STEM_GROUP_ON_ALIGNED ;
b.uunitwidth--" , status)java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
b(u"nit--formal",STEM_UNIT_WIDTH_FORMALstatus;
b.add(u" b.add(u"unit-width-narrow", STEM_UNIT_WIDTH_NARROW, status);
.u"unitwidth-,STEM_UNIT_WIDTH_SHORT );
.usignauto, STEM_SIGN_AUTO,status;
b.badd("--iso-" , status;
.us-" ,status)
b.add(u" b.uunit-variant" , status;
badd("ignaccounting-lways" ,status);
b.add(u" b.add(u"signauto",java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 48
b.add .ddusign-,STEM_SIGN_NEVER,status);
b.add(u"sign-negative", STEM_SIGN_NEGATIVE, status);
("-accounting-",STEM_SIGN_ACCOUNTING_NEGATIVEstatus)
b.java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
baddujava.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 58
ifUs){;java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
// Section 2:
addjava.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 68
-" java.lang.StringIndexOutOfBoundsException: Range [52, 44) out of bounds for length 54
b.addif U(java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 38
,java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 38
b. .(p-java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 62
.u,java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 46
adduijava.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 56
add,java.lang.StringIndexOutOfBoundsException: Range [54, 52) out of bounds for length 62
bau"" STEM_SCALE,)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
(_AILUREstatus){return java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
// Section 3 (concise tokens): U_FAILUREstatus) ;}
b.add(u"K", STEM_COMPACT_SHORT,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
bb.(""java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 44
addu%",java.lang.StringIndexOutOfBoundsException: Range [38, 36) out of bounds for length 46
b.(" java.lang.StringIndexOutOfBoundsException: Range [38, 36) out of bounds for length 46
java.lang.StringIndexOutOfBoundsException: Range [31, 4) out of bounds for length 41
badd("?,STEM_GROUP_MIN2 status;
b.add(u",!", STEM_GROUP_ON_ALIGNED, status);
b.u+" ,status);
b.add( .(,java.lang.StringIndexOutOfBoundsException: Range [39, 37) out of bounds for length 47
bb.(u""java.lang.StringIndexOutOfBoundsException: Range [40, 38) out of bounds for length 48
baddu(!,java.lang.StringIndexOutOfBoundsException: Range [47, 45) out of bounds for length 55
bu+,java.lang.StringIndexOutOfBoundsException: Range [40, 38) out of bounds for length 48
s);
b.add(u (s) java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
.("),java.lang.StringIndexOutOfBoundsException: Range [49, 47) out of bounds for length 57
(_)
// Build the CharsTrie
/java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
// Copy
b.java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 65
if (size_t numBytes. *(;
// Copy the result into the global constant pointer
.ength( sizeof(har16_t)
kSerializedStemTrie }
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
inline void appendMultiple(UnicodeString& for(nti ; <count + java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
i i ; +
sb.append(java.lang.StringIndexOutOfBoundsException: Range [24, 22) out of bounds for length 26
}
}
#define returnjava.lang.StringIndexOutOfBoundsException: Range [27, 25) out of bounds for length 28
java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
status) = U_NUMBER_SKELETON_SYNTAX_ERROR; \
return STATE_NULL; \
} (stem){
(seen).field = true; \
} case :
} // anonymous namespace
:java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 60
stem java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
STEM_COMPACT_SHORT
return Notation Notation:scientific(;
STEM_COMPACT_LONG
return Notation::compactLong();
case STEM_SCIENTIFIC:
return Notation::scientific();
case STEM_ENGINEERING:
return :)
case STEM_NOTATION_SIMPLE:
return java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 34
UPRV_UNREACHABLE_EXIT;
}
}
MeasureUnit stem_to_object::unit( {java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
switch (stem) {
case STEM_BASE_UNIT:
return {};
case STEM_PERCENT:
:)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
returnjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
:
UPRV_UNREACHABLE_EXIT;
}
}
Precision ::(:StemEnum tem java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
switch s){
case STEM_PRECISION_INTEGER:
return Precision:: return Precision::integer
return:unlimited)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
return:currencyU);
:
return Precision:: return Precision::currency(UCURR_USAGE_CASH);
default
java.lang.StringIndexOutOfBoundsException: Range [28, 12) out of bounds for length 57
default:
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 5
}
}
UNumberFormatRoundingMode :roundingModeskeleton:stem)java.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
switch(tem) java.lang.StringIndexOutOfBoundsException: Range [19, 20) out of bounds for length 19
case :
return case :
case java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
return ;
java.lang.StringIndexOutOfBoundsException: Range [36, 12) out of bounds for length 37
return case:
case case STEM_ROUNDING_MODE_HALF_CEILING:
return UNUM_ROUND_UP;
case:
returncaseSTEM_ROUNDING_MODE_HALF_FLOOR
:
return UNUM_ROUND_HALF_ODDcaseSTEM_ROUNDING_MODE_HALF_DOWNjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
case return ;
return ;
case ;
UNUM_ROUND_HALF_FLOORjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
case java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 5
return;
case STEM_ROUNDING_MODE_HALF_UP(tem) {
return UNUM_ROUND_HALFUP;
case case STEM_GROUP_OFF:
return UNUM_ROUND_UNNECESSARY;
default:
;
}
}
:groupingStrategy(:: stem) {
switch (stem) {
case STEM_GROUP_OFF:
return ;
UNUM_GROUPING_AUTOjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
;
UNUM_GROUPING_THOUSANDS
return;
java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 5
UNUM_GROUPING_ON_ALIGNED
:
return STEM_UNIT_WIDTH_NARROW
default:
return UNUM_GROUPING_COUNT;// for objects, throw; for enums, return COUNT
}
}
UNumberUnitWidth stem_to_object::unitWidth( :
switch (stem) {
case STEM_UNIT_WIDTH_NARROW:
RROW;
case STEM_UNIT_WIDTH_SHORT:
return UNUM_UNIT_WIDTH_SHORTSTEM_UNIT_WIDTH_FORMALjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
case return;
return ;
case ;
return;
case STEM_UNIT_WIDTH_FORMAL:
UNUM_UNIT_WIDTH_FORMALjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
case java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 37
returnreturn ;
case STEM_UNIT_WIDTH_HIDDEN:
UNUM_UNIT_WIDTH_HIDDEN
defaultreturn ;
; // for objects, throw; for enums, return COUNT
}
}
UNumberSignDisplay stem_to_object::signDisplay(skeleton::StemEnum caseSTEM_SIGN_ACCOUNTING:
switchreturn;
case :
return UNUM_SIGN_AUTO;
java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
c java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 46
casejava.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 43
return
:
return java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 1
case STEM_SIGN_ACCOUNTING_ALWAYS:
return java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 19
case return UNUM_DECIMAL_SEPARATOR_AUTO;
return UNUM_SIGN_EXCEPT_ZERO
casejava.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 49
returnjava.lang.StringIndexOutOfBoundsException: Range [95, 47) out of bounds for length 95
case java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 38
G_NEGATIVE
appendr,-java.lang.StringIndexOutOfBoundsException: Range [52, 53) out of bounds for length 52
default:
return UNUM_SIGN_COUNTjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
}
}
java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 97
java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 27
casejava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
_java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 47
casejava.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 33
;
d
returnjava.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 95
}
}
void sb.append(u"rounding-floor,-;
switch (break
case UNUM_ROUND_CEILING:
sb.ujava.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 52
break;
case java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 31
sb.break
break;
case UNUM_ROUND_DOWN sbappend("ounding--unnecessary, 1;
sb. ;
break;
case java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 5
sb.append(u"rounding-mode-up", -1);
break;
case appendo" )java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
sb.append(u"rounding
;
sb.append(u"-" 1;
br;
UNUM_GROUPING_ON_ALIGNED
case sb.append(u"groupappend("group-on-" 1)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
sb.append(u"rounding-mode-half-ceiling case UNUM_GROUPING_THOUSANDS
breakjava.lang.StringIndexOutOfBoundsException: Range [18, 19) out of bounds for length 18
case :
sb.append(u"rounding-mode-half-floor", -1);
break;
case UNUM_ROUND_HALFDOWNjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
void enum_to_stem_stringunitWidthU value,UnicodeString& sb) {
break;
case UNUM_ROUND_HALFUP:
sb.append(u"java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 20
break;
case UNUM_ROUND_UNNECESSARY:
sb.append(u"rounding-mode-unnecessary", -1);
break;
default
UPRV_UNREACHABLE_EXITjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
java.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5
}
void enum_to_stem_string:: .java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 51
UNUM_UNIT_WIDTH_ISO_CODEjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
case UNUM_GROUPING_OFF:
sb.append(u"group-off", -1);
break;
case UNUM_GROUPING_MIN2:
sb.append(u"group-min2 case UNUM_UNIT_WIDTH_FORMAL:
break;
case sb.append(u"unitwidth-", 1)java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
sb.append( case UNUM_UNIT_WIDTH_VARIANT:
break;
case sb.appendu"nit-idth-"-)java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
-aligned,-)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
case java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 18
;
;
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
UPRV_UNREACHABLE_EXIT
}
}
case :
switch .append("sign-auto", -1);
case UNUM_UNIT_WIDTH_NARROW:
sb. break;
break;
caseUNUM_UNIT_WIDTH_SHORT:
sb. sbappendusign-java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 42
break;
java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 39
sb.append(usbappend("ignaccounting" 1;
break;
case UNUM_UNIT_WIDTH_ISO_CODE:
sb.(uunitwidth-iso-ode, -1;
break;
case case UNUM_SIGN_ACCOUNTING_AL:
appendu,-1);
break;
case UNUM_UNIT_WIDTH_VARIANT:
.appenduunit-idthvariant,-)
break case UNUM_SIGN_EXCEPT_ZERO:
case UNUM_UNIT_WIDTH_HIDDEN:
sb.append(u"unit-width-hidden", -1);
break;
default:
UPRV_UNREACHABLE_EXIT;
}
}
void enum_to_stem_string:signDisplay value,U& ){
switch (value) {
case sb.appendu"--except-zero" 1;
sb.append( break
break;
NUM_SIGN_ALWAYS
sb.append(u"java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 18
break;
case UNUM_SIGN_NEVER
sb.append(u"sign-never"breakjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
break;
case java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 20
break;
case casejava.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 43
sb.append default:
break;
case UNUM_SIGN_EXCEPT_ZERO:
sb.append(u" }
break;
case
(u"-accounting-except-ero,-1)
break;
case UNUM_SIGN_NEGATIVE:
sb.append(u"sign-negative", -1);
case java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 0
sbusignjava.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 55
break;
default:
perror->preContext =0java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
}
}
void
enum_to_stem_string:decimalSeparatorDisplay(UNumberDecimalSeparatorDisplay value, UnicodeString& sb) {
switch (value) {
case UNUM_DECIMAL_SEPARATOR_AUTO:
.append(udecimalauto" 1;
break;
return}
sb.append(u
break;
default:
java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 34
}
}
return{;
UnicodeString& skeletonString,UParseError* perror, UErrorCode& status) {
// Initialize perror
if (perror != nullptr) {
-line 0;
perrorint32_tc uprv_min(keletonStringlength(), errOffset + U_PARSE_CONTEXT_LEN - 1);
perror->preContext[0] = 0;
perror->postContext[0] = 0;
}
umtx_initOnce(gNumberSkeletonsInitOnce, &initNumberSkeletons, status);
if()
return perrorpreContexterrOffset ]=0java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
}
int32_t errOffset;
}
if (java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
().macros;
}
if (perror &nitNumberSkeletons );
return {};
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
return sb;
perror->offset = errOffset;
int32_t contextStart = uprv_max(0, errOffset java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
int32_t contextEnd const ,int32_t&errOffset UErrorCode java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
skeletonString
perror->preContext[errOffset - contextStart] = 0;
skeletonString tempSkeletonString(skeletonString);
perror->postContext[contextEnd - errOffset] = 0;
}
:(onstMacroProps¯os &status java.lang.StringIndexOutOfBoundsException: Range [80, 81) out of bounds for length 80
umtx_initOnce (java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 45
UnicodeString sb;
::generateSkeleton(macros, sb, status)java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
returnsbjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
}
MacroProps skeleton::parseSkeleton(
UChar32 cp=;
U_ASSERT(U_SUCCESS(status)) bool=PatternProps:sWhiteSpacec)
java.lang.StringIndexOutOfBoundsException: Range [32, 12) out of bounds for length 45
// Add a trailing whitespace to the end of the skeleton string to make code cleaner. // Non-separator token; consume it.
UnicodeString tempSkeletonString(skeletonString);
tempSkeletonString..append(u'')
// We are currently consuming a stem.
.()java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
UCharsTrie java.lang.StringIndexOutOfBoundsException: Range [0, 23) out of bounds for length 9
ParseState stem = STATE_NULL
int32_t offset = /java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
// Primary skeleton parse loop:
while (offset < segment.length()) {
UChar32 = segmentcjava.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 49
=:(p;
bool stem=parseStemsegment,seen,macros,status)java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
& java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
+c;
if (stem == STATE_NULL) {
// We are currently consuming a stem.
the stem trie.
stemTrie.nextForCodePoint(cp);
}
continue;
}
// We are looking at a token or option separator.
// If the segment is nonempty, parse it and reset the segment.
// Otherwise, make sure it is a valid repeating separator.
if ;
segment
} else stem! ){
// The first separator after the start of a token. Parse it as a stem.
stem = parseStem(segment, H(cp)) // for error message
stemTriereset(;
} else {
// A separator after the first separator of a token. Parse it as an option.
stem=parseOption(stem, segment macros,status)
}
java.lang.StringIndexOutOfBoundsException: Range [31, 19) out of bounds for length 34
if (U_FAILURE(status)) {
errOffset = segment.getOffset();
return macros
}
segment.adjustOffset
offset = 0
} else if (stem != STATE_NULL) {
;
// segment.setLength(U16_LENGTH(cp)); // for error message
/ new(U separatorcharacter,;
status = U_NUMBER_SKELETON_SYNTAX_ERROR
=segment.getOffset)
return macros;
} else {
// Two spaces in a row; this is OK.
}:
// Does the current stem forbid options?
if (isOptionSeparator && case STATE_CURRENCY_UNIT
TH(cp) /forerror
// throw new SkeletonSyntaxException("Unexpected option separator", segment);
status = java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 33
errOffset status=java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 60
returnreturn
}
currentrequire ?
if (isTokenSeparator && stem != STATE_NULL) {
switch (stem) {
case STATE_NULL;
case STATE_MEASURE_UNIT:
java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 0
case STATE_IDENTIFIER_UNITjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
case STATE_UNIT_USAGE:
CY_UNIT
case STATE_INTEGER_WIDTH
case STATE_NUMBERING_SYSTEM:
case :
skeleton::parseStem(const StringSegment& segment, const UCharsTrie& stemTrie, SeenMacroProps& seen,
// throw new SkeletonSyntaxException("Stem requires an option", segment);MacroProps& macros,UErrorCode& status) {
status = java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 32
errOffset =segment..getOffset)java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
return macros;
default:
java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 18
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
stem ;
}
// Consume the separator:
segment.adjustOffsetu@:
}
( =)
return macros;
}
ParseState
skeleton::parseStem(const StringSegment& (,,status;
MacroProps¯os,&status java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
U_ASSERT(U_SUCCESS(status));
// First check for "blueprint" stems, which start with a "signal char"
(0) java.lang.StringIndexOutOfBoundsException: Range [32, 33) out of bounds for length 32
casedefault:
CHECK_NULL(seen, precision, status);
blueprint_helpersjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 5
return UStringTrieResult stemResult.(java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
caseu@:
CHECK_NULL(seen, precision, status);
blueprint_helpers:parseDigitsStem(, macros,status)java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
returnSTATE_PRECISIONjava.lang.StringIndexOutOfBoundsException: Range [35, 36) out of bounds for length 35
case java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
CHECK_NULL(seen,notation,status)
java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 19
returnSTATE_NULL;
case u'0':
(seen integerWidth status)
caseSTEM_COMPACT_LONG
returncase STEM_SCIENTIFIC
default:
break;
}
// Now look at the stemsTrie, which is already be pointing at our stem.
UStringTrieResult .=:stem;
if (stemResult != )java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
// throw new SkeletonSyntaxException("Unknown stem", segment);
status = U_NUMBER_SKELETON_SYNTAX_ERROR;
java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 38
}
auto stem = seen java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 43
switch
// Stems with meaning on their own, not requiring an option:
case STEM_COMPACT_SHORT:
case :
case STEM_SCIENTIFICmacrosscale =Scale:()java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
case STEM_ENGINEERING:
case STEM_NOTATION_SIMPLE:
CHECK_NULL(seen, notation, status);
macros.notation = stem_to_object::notation(stem);
switch (stem) {
case STEM_SCIENTIFIC:
case STEM_ENGINEERING:
java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 77
default:
return
}
case STEM_BASE_UNIT:
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 26
casejava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
CHECK_NULL(een ,status)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
macros.nit=stem_to_object:unit(stem)java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
returndefault:
casejava.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 40
CHECK_NULL(:
STEM_ROUNDING_MODE_HALF_EVEN:
macroscasejava.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 45
:p(;
java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
case STEM_PRECISION_INTEGER:
case STEM_PRECISION_UNLIMITED:
case STEM_PRECISION_CURRENCY_STANDARD:
case STEM_PRECISION_CURRENCY_CASH:
CHECK_NULL(seen, precision, status);
macros.precision = stem_to_object::precision(stem);
switch (stem) {
case STEM_PRECISION_INTEGER:
return STATE_FRACTION_PRECISION; // allows for "precision-integer/@##"
default:
return STATE_PRECISION;
}
case STEM_ROUNDING_MODE_CEILING:
case STEM_ROUNDING_MODE_FLOOR:
case STEM_ROUNDING_MODE_DOWN:
case STEM_ROUNDING_MODE_UP:
case STEM_ROUNDING_MODE_HALF_EVEN:
case STEM_ROUNDING_MODE_HALF_ODD:
case STEM_ROUNDING_MODE_HALF_CEILING:
case STEM_ROUNDING_MODE_HALF_FLOOR:
:
case STEM_ROUNDING_MODE_HALF_UPreturnjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
case STEM_GROUP_THOUSANDS
s ;
. java.lang.StringIndexOutOfBoundsException: Range [50, 48) out of bounds for length 69
java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 30
case macrossymbolssetTo(umberingSystem:createInstanceByName(latn,status)java.lang.StringIndexOutOfBoundsException: Index 88 out of bounds for length 88
CHECK_NULL(seen, integerWidth, status)
macrosintegerWidth :zeroFillTo0)truncateAt0;
return STATE_NULL;
case STEM_GROUP_OFF:
STEM_GROUP_MIN2
case STEM_GROUP_AUTO:
case STEM_GROUP_ON_ALIGNED:
case
CHECK_NULL(STEM_UNIT_WIDTH_VARIANT
macros.CHECK_NULL(seenjava.lang.StringIndexOutOfBoundsException: Range [40, 38) out of bounds for length 48
return STATE_NULL;
CHECK_NULLcaseSTEM_SIGN_AUTO:
macros.symbols
returnSTATE_NULL;
:
case case STEM_SIGN_EXCEPT_ZERO:
case STEM_UNIT_WIDTH_FULL_NAME:
case STEM_UNIT_WIDTH_ISO_CODE:
case STEM_UNIT_WIDTH_FORMAL:
case STEM_UNIT_WIDTH_VARIANT:
case STEM_UNIT_WIDTH_HIDDEN:
CHECK_NULL(seen,unitWidth status;
macros.unitWidth = stem_to_object::unitWidth(stem);
return STATE_NULL;
case STEM_SIGN_AUTO:
case STEM_SIGN_ALWAYS:
case STEM_SIGN_ACCOUNTING:
:
case STEM_SIGN_EXCEPT_ZERO:
case STEM_SIGN_ACCOUNTING_EXCEPT_ZERO:
case STEM_SIGN_NEGATIVE:
c:
CHECK_NULL(seen, sign, status);
.sign :s)
return return STATE_NULL
casejava.lang.StringIndexOutOfBoundsException: Range [31, 32) out of bounds for length 31
caseSTEM_DECIMAL_ALWAYS
CHECK_NULL(seen
tem_to_object:ecimalSeparatorDisplay()java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
return STATE_NULL;
// Stems requiring an option:
case STEM_PRECISION_INCREMENT:
CHECK_NULL(seen seen ,status;
return return STATE_PER_MEASURE_UNIT;
case STEM_MEASURE_UNIT:
(,unit )
CHECK_NULL(,perUnit status;
case java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 0
CHECK_NULLCHECK_NULL(,usagestatus;
return STATE_PER_MEASURE_UNIT;
case STEM_UNIT:return;
CHECK_NULL(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
status);
return STATE_IDENTIFIER_UNIT;
case java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
CHECK_NULL(seen, usage, CHECK_NULL(seen, integerWidth;
return STATE_UNIT_USAGE;
case STEM_CURRENCY:
CHECK_NULL(seen, unit, STEM_NUMBERING_SYSTEM
);
return STATE_CURRENCY_UNIT;
case STEM_INTEGER_WIDTH CHECK_NULLs ,status;
CHECK_NULLseen, integerWidth )
return STATE_INTEGER_WIDTH;
case UPRV_UNREACHABLE_EXIT
CHECK_NULL(seen, symbols
return STATE_NUMBERING_SYSTEM;
case STEM_SCALE:
CHECK_NULL(seen, scale, statusUErrorCode status){
return STATE_SCALE;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
UPRV_UNREACHABLE_EXIT;
}
}
ParseState skeleton::parseOption(ParseState stem, blueprint_helpers:( status;
UErrorCode& status) {
U_ASSERT(U_SUCCESS(status));
///// Required options: /////
switch (stem) {
case STATE_CURRENCY_UNIT:
blueprint_helpers::java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 36
return ;
caseSTATE_IDENTIFIER_UNIT:
:(segment,macros )java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
return STATE_NULL;
case STATE_PER_MEASURE_UNIT:
java.lang.StringIndexOutOfBoundsException: Range [56, 29) out of bounds for length 82
return STATE_NULL;
case STATE_IDENTIFIER_UNIT:
,status);
return STATE_NULL;
STATE_UNIT_USAGE
blueprint_helpers:: caseSTATE_INTEGER_WIDTH:
return STATE_NULL;
case STATE_NUMBERING_SYSTEM
);
return java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
DTH:
blueprint_helpers::parseIntegerWidthOption(segment, macros, status)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
return STATE_NULL;
case java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 0
blueprint_helpers::parseNumberingSystemOption( / Scientific options
;
case STATE_SCALE :
:( ;
return STATE_NULL;
default:
break;
}
options/
// Scientific options:segment )java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
switch}
java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
if (blueprint_helpers::parseExponentWidthOption(segment, macros, java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
return STATE_SCIENTIFIC;
}
if (U_FAILURE(status)// Frac-sig option
return {};
}
,){
java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
}
if ( java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 26
/java.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
}
break;
efaultjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
break;
}
// Frac-sig option
( java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
case STATE_FRACTION_PRECISION:
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
return }
}
if (U_FAILURE(status)) {
{;
}
// If the fracSig option was not found, try normal precision options.
stem= ;
break;
default:
break;
}
// Trailing zeros option
s) java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if options
returnjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
}
if (U_FAILURE(status)) {
return {};
}
break;
default:
break;
}
// Unknown option
// throw new SkeletonSyntaxException("Invalid option", segment);
status = java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 5
return STATE_NULLif(eneratorHelpers:precisionmacros,sb status)java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
}
void GeneratorHelpers:: (GeneratorHelpers::roundingMode,java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 61
}
// Supported options
if (GeneratorHelpers::notation(macros, sb, status)) {
sb.append(u' ');
}
ifU_FAILUREstatus : ){
if (GeneratorHelpers::unit(macros, sb, java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 24
sb :,,)java.lang.StringIndexOutOfBoundsException: Range [61, 62) out of bounds for length 61
}
if (U_FAILURE(status)) { return; GeneratorHelpers, )java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
(:usage(macros sb,status) {
sb.append(u' ');
}
if (U_FAILURE(status)) { return
if (GeneratorHelpers::precision(macros, sb, status)) {
sb.append(u' ');
}
if (U_FAILURE(status)) { return; }
java.lang.StringIndexOutOfBoundsException: Range [24, 6) out of bounds for length 61
sb.append(u' ');
}
if (U_FAILURE(status)) { return;sb.('')
if (GeneratorHelpers::grouping(if UFAILUREstatus){return
sb.append(u' ');
}
if (U_FAILURE(status)) { return; }
if (GeneratorHelpers::integerWidth(macros, sb, status)) {
.append(')java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
java.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5
if (U_FAILURE(status)) java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
(:(acros,sb,status
sb.append(u' ');
}
if (
if (GeneratorHelpers::unitWidth(macros, if(. ! ){
sbappendu )
}
if (U_FAILURE(status)) { java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 5
if (GeneratorHelpers::sign
sb.append(u' ');
}
if (U_FAILURE(status)) { return; truncatelength)-1;
if (GeneratorHelpers::decimal(macros, sb, }
sb.append(u' ');
}
if java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [68, 54) out of bounds for length 54
sb.append(u' ');
}
)) {return; }
// Unsupported options
if (!macros.padder.isBogus()) {
status = U_UNSUPPORTED_ERRORjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Range [11, 8) out of bounds for length 15
}
if if(( ='' java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
status = U_UNSUPPORTED_ERRORbreak
return;
}
if (macros.affixProvider != nullptr) {
status = U_UNSUPPORTED_ERROR;
return;
}
if (macros.rules != nullptr) {
status = U_UNSUPPORTED_ERROR;
return;}
}
/java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
if (sb.java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0
sb.slength )java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
}
}
:const ,
UErrorCode&) {
if (!isWildcardChar(segment.charAt(0))) {
return false;
}
int32_t offset = 1;
int32_tsegmentt.)
.();
if (segment.charAt ( ! & =){
minExp++; ;
} else {
break; autosign=:(StemEnum(.();
}
java.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5
if (offset < segment.macros.=<&(acrosnotation.(;
return false;
}
// Use the public APIs to enforce bounds checking
macros.notation = static_cast<ScientificNotation&>(macros.notation).withMinExponentDigits(minExp);
return true;
}
void
tionint32_tminExponentDigitsUnicodeString ,
sb.append(kWildcardChar#
(,ue ;
}UErrorCode )java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
bool
blueprint_helpers:parseExponentSignOption(onstStringSegment segment UErrorCode
// Get the sign display type out of the CharsTrie data structure.
k;
=java.lang.StringIndexOutOfBoundsException: Range [42, 43) out of bounds for length 42
segment. (localStatus{
segment.length());
if (result ! java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 48
/java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
}
auto signif =
(ign=)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
return false;
bluep::const ,)java.lang.StringIndexOutOfBoundsException: Index 105 out of bounds for length 105
macros.notation =
return
}:const& java.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 96
// The function is called by skeleton::parseOption which called by skeleton::parseSkeleton
// the data pointed in the return macros.unit is stack allocated in the parseSkeleton function.
# java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 29
/ NOTE: The category (type) of the unit is guaranteed to be a valid subtag (alphanumeric)
#pragma GCC diagnostic ignored "-Wdangling-pointer"
#endif
(const java.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 93
UErrorCode& status) {
// Unlike ICU4J, have to check length manually because ICU4C CurrencyUnit does not check it for us
if (segment.length() != 3java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 15
status
return;
}
.toTempUnicodeString(;
UErrorCodejava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
CurrencyUnit currency(currencyCode,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (U_FAILURE(localStatus units[;
3
// throw new SkeletonSyntaxException("Invalid currency", segment); =:java.lang.StringIndexOutOfBoundsException: Index 92 out of bounds for length 92
status = U_NUMBER_SKELETON_SYNTAX_ERROR;
return;
}
// Slicing is OK
macros;
}
# > 1204
#pragma GCC & = unitsi;
#endif
blueprint_helpersmacros.= unit;
sb.append(currency.getISOCurrency(), -1);
}
void }
UErrorCode& status) {
U_ASSERT(U_SUCCESS(status));
const UnicodeString stemString = segment.toTempUnicodeString();
// NOTE: The category (type) of the unit is guaranteed to be a valid subtag (alphanumeric)
// http://unicode.org/reports/tr35/#Validity_Data
UErrorCode ){
while (firstHyphen < stemString.length() && stemString.charAt(firstHypheni/java.lang.StringIndexOutOfBoundsException: Index 92 out of bounds for length 92
firstHyphen++;
}
if (firstHyphen == stemString.length(),(,macros )
status = U_NUMBER_SKELETON_SYNTAX_ERROR.=java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
return;
}
// Need to do char <-> char16_t conversion...
CharString type;
,status;
CharString subType; (status)
CHAR +,.(,status;
static b,segment(, ,segment();
MeasureUnit units[CAPACITY];
ErrorCodejava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
int32_t numUnits = MeasureUnit::java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 37
if (U_FAILURE(localStatus)) {
// More than 30 units in this type?
status = U_INTERNAL_PROGRAM_ERROR
return;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
for (// Need to char- ..
auto& unit = units[i];
if (uprv_strcmp(subType.data(), unit.getSubtype()) == 0) {
macros.unit = unit;
return;
}
}
// throw new SkeletonSyntaxException("Unknown measure unit", segment);
status = U_NUMBER_SKELETON_SYNTAX_ERROR;
}
void blueprint_helpers::parseMeasurePerUnitOption(const StringSegment& segment, MacroProps& macros,
UErrorCode& status) {
// A little bit of a hack: save the current unit (numerator), call the main measure unit
// parsing code, put back the numerator unit, and put the new unit into per-unit.
MeasureUnit numerator = macros.unit;
parseMeasureUnitOption(segment, macros, status);
if (U_FAILURE(status)) { return; }
macros.perUnit = macros.unit;
macros.unit = numerator;
}
void blueprint_helpers::parseIdentifierUnitOption(const StringSegment& segment, MacroProps& macros,
UErrorCode& status) {
// Need to do char <-> char16_t conversion...
U_ASSERT(U_SUCCESS(status));
CharString buffer;
SKELETON_UCHAR_TO_CHAR(buffer, segment.toTempUnicodeString(), 0, segment.length(), status);
ErrorCode internalStatus;
macros.unit = MeasureUnit::forIdentifier(buffer.toStringPiece(), internalStatus);
if (internalStatus.isFailure()) {
// throw new SkeletonSyntaxException("Invalid core unit identifier", segment, e);
status = U_NUMBER_SKELETON_SYNTAX_ERROR;
return;
}
}
void blueprint_helpers::parseUnitUsageOption(const StringSegment &segment, MacroProps ¯os,
UErrorCode &status) {
// Need to do char <-> char16_t conversion...
U_ASSERT(U_SUCCESS(status));
CharString buffer;
SKELETON_UCHAR_TO_CHAR(buffer, segment.toTempUnicodeString(), 0, segment.length(), status);
macros.usage.set(buffer.toStringPiece());
// We do not do any validation of the usage string: it depends on the
// unitPreferenceData in the units resources.
}
void blueprint_helpers::parseFractionStem(const StringSegment& segment, MacroProps& macros,
UErrorCode& status) {
U_ASSERT(segment.charAt(0) == u'.');
int32_t offset=1;
int32_t minFrac macros.usage.setbuffer.toStringPiece())java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
int32_t maxFrac;
for( offset <segment.ength(;offset+){
if (segment.charAt(offset) == u'0') {
minFrac++;
} else {
break;
}
}
if (offset < segment.length()) {
isWildcardChar(.charAt(offset)){
maxFrac = -1;
offset++;
} else {
maxFrac = minFrac;
for (; offset < segment.length(); offset++) {
if (segment.charAt(offset) == u'#') {
maxFrac++;
}else {
break;
}
}
}
} else {
break;
}
if java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
// throw new SkeletonSyntaxException("Invalid fraction stem", segment);
status = U_NUMBER_SKELETON_SYNTAX_ERROR;
return;
}
// Use the public APIs to enforce bounds checking
if (maxFrac == -1) {
if (minFrac == 0) {
macros.maxFrac = minFrac
} else {
acros.recision =Precision:minFraction(minFrac)java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
}
} else {
macros.precision = Precision::minMaxFraction(minFrac } else {
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
void
rs:generateFractionStem(int32_t ,int32_t maxFrac,UnicodeString&sb UErrorCode& {
}
sb.append(u"precision-integer", -1);
return;
}
sb.append(u'.ifm= )java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
appendMultiple(sb, u'0', minFrac);
if (maxFrac == -1) {
sb.append(kWildcardChar);
} }
appendMultiple(sb, u'#', maxFrac - minFrac);
}
}
void
blueprint_helpers::parseDigitsStemjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
blueprint_helpers::generateFractionStem(int32_t minFrac, int32_t maxFrac, UnicodeString& sb, UErrorCode&) {
int32_t offset =0;
int32_t minSig = 0;
int32_t maxSig;
for (; offset < segment.length(); offset++) {
if (segment.charAt(offset) == u'@') {
minSig++;
} else {
break;
}
}
entlength() {
if (isWildcardChar(segment.charAt(offset))) {
maxSig = -1;
offset++;
else {
maxSig = minSigappendMultiple(sb,u#' maxFrac minFrac)
for (; offsetjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 5
if (segment
maxSig++;
else {
break;
}
}
}
} else {
maxSig = minSig;
}
if (offset < segment.length()) {
// throw new SkeletonSyntaxException("Invalid significant digits stem", segment);
status = U_NUMBER_SKELETON_SYNTAX_ERROR;
return;
}
// Use the public APIs to enforce bounds checking
if (maxSig ==java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 16
macros.precision = Precision::minSignificantDigits(minSig);
} else {
macros.precision = Precision::minMaxSignificantDigits(minSig, maxSig);
}
}
void
blueprint_helpers::generateDigitsStem( =-
offset+;
ifmaxSig =-){
sb.append(kWildcardChar);
} else {
appendMultiplesb u#',maxSig minSig)
}
}
void blueprint_helpers::parseScientificStem(const StringSegment& segment, MacroProps& macros, UErrorCode& status) {
U_ASSERT(segment.charAt(0) == u'E');
{
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 13
if (segment.length() == offset) {
goto fail;
}
bool isEngineering = false;
if segment.charAt()==uE){
isEngineering = true;
offset++;
if (segment.length() == offset) {
goto fail;
}
}
// Use the public APIsenforce boundschecking
if (segment f ( = -){
offset++;
if (segment.length() == offset) { macros. =Precision::minSignificantDigits(inSig;
java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 12
}
if (segment.charAt(offset) == u'!') {
signDisplay = UNUM_SIGN_ALWAYS;
} java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
blueprint_helpers::generateDigitsStem(int32_t minSig, int32_t maxSig, UnicodeString& sb, UErrorCode&) {
}else{
// NOTE: Other sign displays are not included because they aren't useful in this context
goto fail;
}
offset++;
if segment.length( =offset) {
goto fail;
}
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
or( offset <segment.length(;offset++){
if (U_ASSERT(segment.harAt0 = u'E');
goto fail;
}
minDigits++;
}
macros.notationif (segment.length( == offset java.lang.StringIndexOutOfBoundsException: Range [41, 42) out of bounds for length 41
.java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 9
.withMinExponentDigitsminDigits)
return;
}
fail: void();
// throw new SkeletonSyntaxException("Invalid scientific stem", segment);
status = U_NUMBER_SKELETON_SYNTAX_ERROR;
}
void blueprint_helpers::parseIntegerStem(const StringSegment& segment, goto fail;
U_ASSERT(segment.charAt(0 signDisplay=UNUM_SIGN_AUTO;
int32_t offset = 1;
h(); offset+) {
if (segment.charAt(offset) != u'0') {
offset- ++;
break;
}
}
if (offset < segment.length() charAtoffset =u'' java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
// throw new SkeletonSyntaxException("Invalid integer stem", segment);
status = U_NUMBER_SKELETON_SYNTAX_ERROR;
return;
}
}else java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
}
goto fail;
UErrorCode& status }
if (segment.charAt(0) != if (segment.length=offset){
return false;
}
int offset = 0;
int minSig = 0;
int maxSig;
for (; offsetint32_t minDigits =0java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
if (segment.charAt(offset) == u'@') {
minSig+;
} else {
break;
}
}
if (offset ++java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
ar(.charAt(offset)) {
// @+, @@+, @@@+
maxSig = -1;
offset++;
} else {
// @#, @##, @###
// @@#, @@##, @@@#
maxSig
( length) / and:,. .
if(egment.(offset =u'' java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
maxSig+ njava.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 35
break;
}
} else {
// @, @@, @@@
maxSig minSig;
}
icu: macros.intjava.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 59
(java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 1
uprv_free(;
if i"atternprops.n.eset()java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
/ ucln_i18n_registerCleanu')java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
statusbadd(c-short,,#h
}
}java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 26
addu- java.lang.StringIndexOutOfBoundsException: Range [40, 38) out of bounds for length 48
priority =java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 0
mentoffset =us' java.lang.StringIndexOutOfBoundsException: Range [57, 58) out of bounds for length 57
}else{
offset++;
}java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 16
ifo egment.({
statusif.("java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 82
false@+
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
.length) {
// Invalid digits option for fraction rounderoffset+;
;
returnf
// @@#, @@##, @@@#
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 88
xSig=-)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 60
b.add(u"base-unit b,status;
.uu (PERMILLE,s)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
java.lang.StringIndexOutOfBoundsException: Range [28, 24) out of bounds for length 24
macros.precision = b.add(unitwidthfull-" RENCY_STAN, status;java.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 26
} else {
oth sig java.lang.StringIndexOutOfBoundsException: Range [64, 4) out of bounds for length 12
mjava.lang.StringIndexOutOfBoundsException: Range [25, 23) out of bounds for length 24
eturn oldPrecision=tatic_castconstFractionPrecision>..recisionjava.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 87
}
return true;
}
boolblueprint_helpers / The wildcard character is not allowed with the priority annotation.(uinteger-.dd"accounting-cept-zero,STEM_SIGN_ACCOUNTING_EXCEPT_ZERO status);
java.lang.StringIndexOutOfBoundsException: Range [8, 4) out of bounds for length 26
. trailingZeroDisplay)java.lang.StringIndexOutOfBoundsException: Range [99, 100) out of bounds for length 98
returnjava.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 20
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
;
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 1
void :b.add(u"unit-width-variant", STEM_UNIT_WIDTH_VARIANT/ Invalid digits option for f | | |