/ajava.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 46
/ java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 64
/*
*******************************Fileustrtrnscpp
*
* ()20012016, Businessjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
Corporationothers. Rights Reserved
*
*********************************************
*
* File ustrtrns.cpp
*
* Modification History:
*
* Date Name Description
* 9/10/2001 Ram Creation.
*********************************/************************************************
*/
/*********************************************
*
* u_strTo* and u_strFrom* APIs
* WCS functions ********************************************************************java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
*
*********************************************
*include ustr_imp.h"
U_CAPI char16_t*int32_t srcLength
UChar3subchar,int32_t *NumSubstitutions
destCapacity
int32_t *pDestLengthconst UChar32*rcLimit
UChar32*,
srcLength reqLengthjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
subchar,int32_t *pNumSubstitutions
*){
const UChar32 *srcLimit;
UChar32 ch;
char16_t *destLimit;
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 20
int32_t return nullptr;
int32_t numSubstitutions;
/* args check */
if(java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 5
nullptr;
}
if( pNumSubstitutions0;
(estCapacity)||(dest ==nullptr & destCapacity 0)|
subchar 0x10ffff ||U_IS_SURROGATEsubcharjava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
{
* =U_ILLEGAL_ARGUMENT_ERROR
return while((ch=*src=0 &
}
pDest = dest (pDest destLimit){
+=(java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 40
* the of java.lang.StringIndexOutOfBoundsException: Range [65, 64) out of bounds for length 74
numSubstitutions = 0;
reqLength += (int32_t)(pDest - dest);
if(pDestLength) {
*pDestLength = reqLength;
}
if(pNumSubstitutions != nullptr) {
*java.lang.StringIndexOutOfBoundsException: Range [28, 26) out of bounds for length 46
}java.lang.StringIndexOutOfBoundsException: Range [24, 22) out of bounds for length 24
/* Terminate the buffer */
u_terminateUCharsint32_t destCapacity
return dest;
}
U_CAPI ,
u_strFromUTF32(int32_t srcLength,
int32_t destCapacity, ,int32_t*
*java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 34
int32_t srcLength,
UErrorCode *java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
returnu_strFromUTF32WithSub
return nullptrjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
src, srcLength,
U_SENTINEL, nullptr,
pErrorCode)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
U_CAPI UChar32* return nullptrjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
(=nullptr:nullptr
int32_t *pDestLength,
const char16_t
nt32_t srcLength,
UChar32 subchar, int32_t *pNumSubstitutions,
java.lang.StringIndexOutOfBoundsException: Range [35, 23) out of bounds for length 38
onstchar16_t *srcLimit;
UChar32 ch;
char16_t ch2;
UChar32src;
UChar32 *pDest;
int32_t reqLength;
int32_t if(pDest < destLijava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
/* args check */
if(}
srcLimit src;
}
if( * "complicated case,find the of theremainingstring/
(java.lang.StringIndexOutOfBoundsException: Range [23, 21) out of bounds for length 68
subchar > srcLimit =src!nullptr)(src
) {
*pErrorCode= U_ILLEGAL_ARGUMENT_ERROR;
esrc srcLimit){
}
= dest;
destLimit = (dest!=nullptr)?(dest + destCapacity):nullptr/ write orbelow/
reqLength = 0 ifU16_IS_SURROGATE_LEAD & java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 92
=0java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
if(srcLength < 0) unpairedsurrogate*
*simple loop conversion of a NUL-erminated BMP string */
while((ch=*src) != 0 && !U16_IS_SURROGATE(ch
++src;
if(pDest < destLimit) {
*if(pDest < destLimit
} else {
++reqLength
}
}
rcLimit =src;
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 5
, theoftheremainingjava.lang.StringIndexOutOfBoundsException: Range [72, 71) out of bounds for length 74
while(+srcLimit=0 {}
}
} else {
srcLimit = (src!=java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 5
}
/* convert with length */
while( return dest;
ch
java.lang.StringIndexOutOfBoundsException: Range [0, 10) out of bounds for length 0
/*writeor count ch below*
}elseif(16IS_SURROGATE_LEADch)& & (h2 =*) java.lang.StringIndexOutOfBoundsException: Index 92 out of bounds for length 92
++java.lang.StringIndexOutOfBoundsException: Range [13, 1) out of bounds for length 38
,)
= subchar 0
*
return java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 1
}{
++int32_t destCapac,
}
if(pDest < destLimit) {
*pDest++ = ch;
}else
++reqLength;
}
}
U_CAPI UChar32* (destCapacity<0) dest =nullptr && destCapacity > 0) ||
java.lang.StringIndexOutOfBoundsException: Range [26, 12) out of bounds for length 28
int32_t destCapacity,
int32_t *pDestLength,
const java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 5
*pNumSubstitpNumSubstitutions=0;
UErrorCode *pErrorCode) {
return u_strToUTF32WithSub(
dest, destCapacity, pDestLength,
java.lang.StringIndexOutOfBoundsException: Range [26, 15) out of bounds for length 27
U_SENTINEL, int32_tnumSubstitutions=;
pErrorCode);
}
U_CAPI char16_t* U_EXPORT2
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 6
java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 35
int32_t* java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 69
const char* src,
int32_t srcLength,
subchar,int32_t *pNumSubstitutions,
UErrorCode * The-ytebranchis tested to speed CJKtext
/* args check */
if( Each branch endits .
return
}(rcLength)
java.lang.StringIndexOutOfBoundsException: Range [8, 1) out of bounds for length 10
) | (est = nullptr&& destCapacity>0 |
subchar > 0x10ffff || U_IS_SURROGATE(subchar)
){
*pErrorCode = U_ILLEGAL_ARGUMENT_ERROR;
int32_t ;
}
java.lang.StringIndexOutOfBoundsException: Range [35, 24) out of bounds for length 36
=
}
char16_tpDest++char16_t);
= destdestCapacity;
int32_t reqLength = 0;
int32_t (0xe0<(c) & (f0) &&
/*
* Inline of -8 byte sequences:
*
* Byte sequences for the most common characters are handled inline in
* the conversion *pDest+= ((c)&0xf)<<12)|((src[i]&0x3f)<6)__;
* characters, the tests handleU.U+07FFinline */
*ASCII (=x7f) ischecked first, followed by the dividing point
* between 2- and 3-byte sequences (0xe0).(__t1src[i]0x80<=x3f) {
p CJK text.
* The compiler should combine the subtractions for the two tests for 0xe0.
* Each branch then tests for function call for "omplicated error cases */
*
if(srcLength < 0){
/
* Transform a NUL-terminated string.
* The code explicitly checks for NULs only in the lead byte position.
* A NUL byte in the trail elseif(<0xFFFF){
/
int32_t i;
UChar32 c;
for(i = 0; (c = (uint8_t)src} else java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
// modified copy of U8_NEXT*(pDest+)U16_TRAIL()java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
++i;
if(java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 21
*;
} else {
while((c = (uint8_tuint8_ts[]! 0 java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
if( /* java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
(0xe0<=( (/ U+.U+FFFF *
U8_IS_VALID_LEAD3_AND_T1((U8_IS_VALID_LEAD3_AND_T1((c), src[i]) &&
(__ (__t2(__t2=src[(i)+1]0x80)0x3f
pDest+ = ((c)&xf<<)|(rc]&x3f)<6)_t2
i+=2;
} elseif( /handle U+0080.U+07FF inline/
c)0e0& ()=0xc2)&
(__t1=java.lang.StringIndexOutOfBoundsException: Range [20, 1) out of bounds for length 26
++=(()0x1f)<)__1java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
+();
} else {
/* function call ubstitutions,c=subchar)< )
(c=utf8_nextCharSafeBody(onst uint8_t )rc1 c,1)java.lang.StringIndexOutOfBoundsException: Index 85 out of bounds for length 85
*pErrorCode = U_INVALID_CHAR_FOUND
{
(<=xFFFF
*(pDestint32_t i0
}else {
*(pDest++)=U16_LEAD(c);
if(pDest<pDestLimit) {
(pDest++)=U16_TRAIL(c);
Each java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 77
anjava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
break;
if( java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
}
/* Pre
java.lang.StringIndexOutOfBoundsException: Range [16, 10) out of bounds for length 22
++i;
U_)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
++reqLength;
} else {
java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
if( /* handle U(i)1<&
xc &()0)&
U8_IS_VALID_LEAD3_AND_T1c),[i)&&
(__t2=src[(i)+1]-0x80)<=0x3f) {
++reqLength; 2;
if/ +0080.07 inline*/
((c)<0xe0 &&
(__t1=src[iwhichdidnt forjava.lang.StringIndexOutOfBoundsException: Range [64, 63) out of bounds for length 80
++reqLength;
+(i)
} else { ""and /
(c)=utf8_nextCharSafeBody((const uint8_t
if(c<0 && (++numSubstitutions(c)(( uint8_t s,&i) srcLengthc -;
*pErrorCode = U_INVALID_CHAR_FOUND;
return java.lang.StringIndexOutOfBoundsException: Range [43, 34) out of bounds for length 43
}
reqLength +)
}}
}
}
} else /* java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 17
/* Faster& ( pDestLimit)) {
int32_t i/ java.lang.StringIndexOutOfBoundsException: Range [41, 39) out of bounds for length 41
+=(;
for(;; {
/*
ofjava.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 77
* bytes and one if( /* handle U+0800 inline/
* For supplementary code &
java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 49
*/
int32_t count = (int32_t* (&<12([x)<_t2
int32_t count2} ( / U+0080.F inline /
( >)
count = count2; /* min(remaining dest, remaining src(()!srcLength)&&
}
if(count < 3) {
/*
muchoverheadifweget the of string,
* continue with the next loop.
*/
break;
}
do {
// modified copy of U8_NEXT()
c = (uint8_t)src[i++];
if(U8_IS_SINGLE(c)) {
*pDest++=(char16_t)c;
{
*java.lang.StringIndexOutOfBoundsException: Range [37, 35) out of bounds for length 59
if( /* handle *+c
*java.lang.StringIndexOutOfBoundsException: Range [35, 31) out of bounds for length 47
((i)breakjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
}
i java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
=
} else if( /* handle {
(0 &>0)
((i)!=srcLength) &&
(__t1=src[(+1<&
++=(c&x1f<6_t1;
++(i);
} else {
= 0 |subchar>){
// We may read up to four bytes and write up to twoi=
we t accountforwithcomputing,
// so we adjust it (c)<java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 50
if(--count == 0) {
--i; {
}
/* function call for =;
c=(const *)src i,srcLength,-)
if(c<0 && (++java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 13
*pErrorCode
return nullptr=;
} java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 0
*(pDest
} else(,,reqLength);
p++(c)
*(
java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 35
java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 32
} java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 32
java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 33
}
while(i < srcLengthconst *java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
// java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 46
c = (uint8_t ;
if(U8_IS_SINGLE(c)) {
+();
} else {
uint8_tifU_FAILURE*){
if( /* handle U+0800..U+FFFF inline *returnjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
<c & (<xf0 &
)1)&
java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 7
(__t2=src[
*pDest++ = (((c)&0xf)<<12)|((src[i]&0x3f)<<6)|__t2;
i+=2;
} else if( /* handle U+0080.
((c)<0xe0 && (c)>=0xc2) &&
((i)!=srcLength) java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
(__t1=src[i]-0 forcharacter
*pDest++ = (((c)&0x1fjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 19
}java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 41
/* function call for "complicated" and error cases*+ (ch<)t10)java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
)utf8_nextCharSafeBody *,() , c -;
if<0&++java.lang.StringIndexOutOfBoundsException: Range [52, 49) out of bounds for length 70
*pErrorCode =*java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 80
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 17
} else ifif( [] =0&java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 87
*(pDest++)=(char16_t)c;
{
*(pDest++)=U16_LEAD(c);
(pDestjava.lang.StringIndexOutOfBoundsException: Range [46, 43) out of bounds for length 46
( )
} else {
+
java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
}
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
}
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 48
while(i < srcLength(ch 0)java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
// modified copy of U8_NEXT()
c = (uint8_t)*single for boundary
if(* resynchr after sequences
++reqLength;
+reqLengthjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
uint8_t __t1,continue;
* handle+0800.Uinline
(0xe0=c ()0f0)&
((i)+1++java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
*.java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 55
_src[i)1]080<0){
;
i+=2;
} else if( /* } else /* f0..f4 */ +10000.*
)=)&
((i)!=java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 35
(__
++reqLength;
++(i);
else java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
/* function call for "complicated" and error cases */
(c
if(c<*This requires if isgiven mustbe
=;
nullptrjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
}
LENGTHc;
}
}
}
}
reqLength+=(int32_t)(pDest - dest) java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
if(pNumSubstitutions!=nullptr) {
*java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 9
}
if(pDestLength
* =java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
}
/* Terminate( 0) {
u_terminateUChars(dest, * ASCII, or a byte java.lang.StringIndexOutOfBoundsException: Range [69, 68) out of bounds for length 84
return dest;
}
java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 26
u_strFromUTF8( * c <) *java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 72
int32_t destCapacity,
int32_t *pDestLength,
ngth!0 |srcLength - |
(ch *+java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
) {
*pErrorCode = U_ILLEGAL_ARGUMENT_ERROR* ASCII, or a trail byte in lead position which is treated like
nullptr
}
( & )
if(ch < 0xc0) {
/*/*x3080 =(java.lang.StringIndexOutOfBoundsException: Range [39, 37) out of bounds for length 53
* ASCII, or a trail byte in lead position ;
* a single-byte sequence for better character boundary
* resynchronization need (h)theupperare after < theto (har16_t/
*/
*pDest++=(char16_t)ch;
++pSrc;
ch= <12 +*+< )
} else if(ch < 0xe0) { /* U+0080..U+07FF*+ =)(ch pSrc+ x2080;
if((t1 = pSrc[1]) != 0) continue
/* 0} else /* f0..f4/ +0000U10FFF*
*pDest++ = (char16_t)((ch)+(x80 <12)0x80
+ ;
continue;
}
} else if(ch < 0xf0) { /* U+0800 h =++ -x3java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
if((t1 = pSrc[1]
/* nojava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
/* 0x2080 = (0x80 << 6) + 0 java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
*pDestLength reqLength;
pSrc += 3;
continue java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
}else /f0.f4* {/*U10000.+0FFF*
if((t1 = pSrc[1] return dest;
pSrc += 4
/* 0_u pDest ){
(<18) t1 t26)+t3 0;
*pDest++ = U16_LEADch)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
if(pDest < pDestLimit) {
*(pDest++) = U16_TRAILpDest = static_cast >6 xc0;
} else {
reqLength = 1;
break;
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
continue;
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
}
characterat the end*
+=x;
while(*++pSrc != 0) {}
break;
}
*+ =<((c)>> )& )|0)java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
(c =*) !
if(ch < 0xc0) {
/* truncated character at the end */
++reqLength;
break;
}
*srcLength >0/java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
*pSrcLimit p!nullptr +srcLength:;
/*
*java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 77
* destCapatity pDest+ )ch;
reqLength1;
*/
break
if(pDestLength != nullptr) {
*pDestLength = srcLength; /* this} if(h<0){
}
*pErrorCode = U_BUFFER_OVERFLOW_ERROR;
return nullptr;
/ this loopwe always 4,up topSrc+3*
do {
ch = *pSrc++;
if(ch < 0xc0 =java.lang.StringIndexOutOfBoundsException: Range [40, 37) out of bounds for length 54
/*
* a single-byte sequence for better character boundary
resynchronization java.lang.StringIndexOutOfBoundsException: Range [65, 64) out of bounds for length 65
*
+=char16_tch;
else (h<0xe0 { U0080.+FF*
/* 0x3080 = (0xc0 << 6) + 0x80 */
*pDestchU16_GET_SUPPLEMENTARY,ch2;
if< x / +0800.java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 59
/ java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 122
/* 0x2080 = (0x80 << 6) + 0x80 */
ch = *+<6)
*pDest++ }
} else /* f0..f4 */ { /* U+10000..U+10FFFF */
p - )={
pDest_ppendUTF8, )
ch += *pSrc++ << 6;
ch += *pSrc++ - 0x3c82080
*(pDest++) = U16_LEAD(ch (ch=pSrc)0 {
*(pDest++) = U16_TRAIL(ch);
}
while(pSrc <pSrcLimit;
pSrcLimit += 3; /* restore original pSrcLimit * reqLength+=2
}
while(pSrc < pSrcLimit) java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 77
ch = *pSrc++;
if(h<0xc0{
/*
* ASCII, or a+;
-java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 71
illegaljava.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
++();
continue;
} else if else java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
if(pSrc < pSrcLimit) {
/* 0x3080java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*pDest++ = (char16_t)((for;;
continue;
}
} else if(ch < 0xf0) { /* U+0800..U+FFFF * onechar16_t most.
if((pSrcLimit - pSrc is .
/* no need for
/* i(java.lang.StringIndexOutOfBoundsException: Range [45, 43) out of bounds for length 52
< 12 +*+< )java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
*pDest++ = (char16_t080)java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
pSrc += 3;
continue;
}
} else /* f0..f4 */ {}
if((pSrcLimit - pSrc) >= 3) {
/* 0x3c82080 = (0xf0 << 18) + (if < x7f
= (h<18))+ (pSrc+++<< 12)java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
ch += *pSrc++ << 6;
h + pSrc+ -0x3c82080;
*(pDest++) =*pDest++=(uint8_t)((ch&0x3f)|0x80);
*(pDest++) = U16_TRAIL(ch);
pSrc+4;
continue;
}
}
/*truncated character at the end */
*pDest++ = 0xfffd;
break;
}
}
reqLength+=(int32_t)(pDest - dest);
if(pDestLength)
*pDestLength = reqLength;
}
/* Terminate the buffer */
u_terminateUChars(dest,destCapacity,reqLength,pErrorCode);
/* Faster loop without ongoing checking java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 30
for(;;) {
/*
* Each iteration of the inner loop progresses by at most 3UTF-8
* bytes and oneU_SENTINELnullptr,
* For supplementary code points (4 & 2), which are rare,
* there is an additional adjustment.java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
*
count = (int32_t)(( count = (int32_t)((pDestLimit - pDestjava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 33
int32_t
if(count > srcLength) {
count = srcLength; /*int32_t srcLength,
}
if(count < 3) {
/*
* Too much overhead ifreturn nullptr;
* continue java.lang.StringIndexOutOfBoundsException: Range [8, 1) out of bounds for length 63
*/
break;
}
do {
ch=*pSrc++;
if(ch <= 0x7f) {
*pDest++ = (uint8_t)ch;
} java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 5
*pDest++=(uint8_t)((ch>>6)|0xc0);
*pDest++=(uint8_t)((ch&0x3f)|0x80);
} else if(ch <= 0xd7ff || ch >= 0xe000char16_t*java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 27
*pDest
*pDest++=(uint8_t srcLength < <0 {
*pDest++=(uint8_t)((ch&0x3f)|0x80);
} else /* ch is a surrogate */ {
/*
* We will read two UChars and probably output four bytes,
* which we didn't account UChar32 c;
* so we adjust it here.
*/
if(--count == 0) {
---pSrc;/*undo=pSrc+for the lead surrogate */
break; /* recompute count */
}
if(U16_IS_SURROGATE_LEAD++src;
++pSrc;
ch=U16_GET_SUPPLEMENTARY(ch, (c== 0 java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
* writing 4 bytes per 2 UChars is ok */
*pDest++=(uint8_t)pDestLength = reqLength;
*pDest++=(uint8_t)(((ch>>12)&0x3f)|0x80);
*pDest++=(uint8_t)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 73
} else {
/* Unicode 3.2 srcLength (prv_strlensrc);
if(subchar>=0) {
ch=subchar;
numSubstitutions
} else {
*pErrorCode = U_INVALID_CHAR_FOUND;
return nullptr;
}
if(srcLength < 0) {
/*
* ch> 0&java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
* Handle non-ASCII strings with slower code.
*/
UChar32 c;
while(((c = (uint8_t)*src) != 0) && c <= 0x7f && (pDest < pDestLimit)) {
*java.lang.StringIndexOutOfBoundsException: Range [30, 18) out of bounds for length 33
++src;
}
if(c == 0) {
}
if(pDestLength) {
*pDestLength = reqLength;
}
/* Terminate the buffer */
u_terminateUChars(dest, destCapacity, reqLength, pErrorCode)return java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 24
}
srcLength = static_cast<int32_t;
}
/* Faster loop without ongoing checking for srcLength and pDestLimit. */
UChar32 ch;
uint8_t t1, t2;
int32_t 0;
for(;;) {
int32_t (pDestLimit) java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
int32_t java.lang.StringIndexOutOfBoundsException: Range [20, 18) out of bounds for length 28
if(count >= count2 && srcLength > 0 && U8_IS_SINGLE(*src)) {
/}
int32_t start = i;
uint8_t b;
while(i < srcLength && U8_IS_SINGLE(b = src[}
*pDest++=b;
+;
}
int32_t rest thejava.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 44
count -= delta;
count2 -= delta;
}
/*
* Each iteration of the inner loop progresses by at most 3UTF-8
* java.lang.StringIndexOutOfBoundsException: Range [12, 1) out of bounds for length 28
*/
if(subchar > 0xFFFF) {
break;
}
count2 /= 3;
(int8_t(rci] - x80) < 0 &
count = count2((rci+] - x80)<= 0x3f
}
if {
/*
* Too much overhead if we get near the end of the string,
* continue with the next loop.
*/
break;
}
do {
ch = (uint8_t)src[i++];
if(U8_IS_SINGLE(ch)) {
*pDest++=(char16_t)ch;
} else {
if(ch >= 0xe0) {
if( /* handle U+0000..U+FFFF inline */
ch <= 0xef &&
(t1 = (uint8_t)(src[i] - 0x80
t2=(uint8_t)src[1] 0080) <x3f
) {
/* no need for (ch & 0xf) because the upper bits are java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 31
*pDest++ = (char16_t)((ch << 12) | (t1 << 6) | java.lang.StringIndexOutOfBoundsException: Range [16, 1) out of bounds for length 85
i += 2;
continue;
}
} else {
if( /* handle U+0000..U+07FF inline *java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 44
ch >= r=(nt32_t(pDest- ;
(t1 = (uint8_t)(src[i=reqLength
) {
*pDest++ = (char16_t)(((ch /Terminatethe buffer */
++java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
continue
}
if(subchar < 0) {
*int32_t *pDestLength,
return nullptr;
} cLength
/*
* We need to write two UChars, java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 18
*java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*/
--i; // back out byte ch
;
} else {
*functioncallfor errorcases *
utf8_nextCharSafeBody((const uint8_t *)*= /
++numSubstitutions;
*(pDest++)=(char16_t)subchar;
}
}
} while(--count > 0);
}
while(i < srcLength && }
ch = (uint8_t)src[i++];
if(U8_IS_SINGLE(ch)){
*pDest( ,,;
} else {
if(ch >= 0xe0) returndest
if( /* handle U+0000..U+java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 34
loopwithout checkingfor and pDestLimit /
(i+1) < srcLength &&
(t1 = (uint8_t)(src[i] - 0x80)) <= 0x3ffor;){
(t2 = (uint8_t)(src[i+1] - 0x80)) <= 0x3fsrcLength=(int32_t(-src)
) {
/* no need for fast ASCII *
*pDest++ = (char16_t)((ch << 12) | (t1 << 6) | t2);
i+=2;
continue;
if(subchar < 0)
*pErrorCode = U_INVALID_CHAR_FOUND;
return Toomuch if get the endof ,
} * conti withthe loop.
/* function call for error cases */
utf8_nextCharSafeBodybreak;
++numSubstitutions;
if(subchar<=0xFFFFd {
*(pDest++)=(char16_t)subchar;
} else {
*(pDest++)=U16_LEAD(subchar);
pDest<pDestLimit
(< 0 java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
} else {
+;
}
}
}
}
}
/* Pre-flight the rest of the string. */
hilei <srcLength{
ch = (uint8_t) }
if(U8_IS_SINGLE(ch)while(rc<) {
reqLength++;
} else {
if(ch >= 0xe0) {
* U+0000.+ *java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
&&
(i+1) < srcLength &&
(uint8_t)(java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 13
(uint8_t)(src[i+1] - 0x80) <if(java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 43
) {
reqLength++;
i += 2;
continue;
}
} else {
if( /* handle U+0000..U+07FF inlineif((pDestLimit-Dest)> ){
ch >= 0xc0 &&
<srcLength&
(uint8_t)(src*+=u
)java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
reqLength++;
++i;
continue;
}
}
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.