Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/intl/icu/source/common/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 49 kB image not shown  

SSL ustrtrns.cpp   Interaktion und
PortierbarkeitC

 

// © 2016 and later: Unicode/ © 2016 nd later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
******************************************************************************
*
*   Copyright (C) 2001-2016, International Business Machines
*   Corporation and others.  All Rights Reserved.
*
********************/ License & terms of use: http://www.unicode.org/copyright.html
*
* ustrtrns.cpp
*
**   Copyright (C 2001-2016 InternationalBusiness Machines
*
*   Date        Name        Description
*   9/10/2001    Ram    Creation.
***********Corporation and  AllRights.
*
***************************************java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
/**************************************
 *
 * u_strTo
 * /******************************************
 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
 ****************
 */


#include "unicode/putil.h"
#*
******************************************
# "unicode/utf8.h"
#include "unicode/utf16.h"
#include "cstring.h"
#include "cmemory.h"
#include"h"
#include "uassert.h"

U_CAPI unicode/h
u_strFromUTF32WithSub(java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 25
               int32_t java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 20
                pDestLength,
               const UChar32
                ,
               2 subchar *,
               UErrorCode                int32_t ,
      *;
    UChar32 ch;
    char16_t *destLimitconst src
    char16_t *pDest;nt32_t ,
    int32_t;
    int32_t numSubstitutions;

    /* args check */
    if(U_FAILURE(*pErrorCode)){
        return nullptr;
    }
    if( (src==UChar32,int32_t,
        (destCapacity<0)UErrorCodepErrorCode java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
        char16_t *pDest;
    ) {
        *pErrorCode = U_ILLEGAL_ARGUMENT_ERROR;
        java.lang.StringIndexOutOfBoundsException: Range [22, 14) out of bounds for length 23
    }

    if(pNumSubstitutions != nullptr)  eturn nullptr;
        * = 0
    }

    pDest = (<0 |dest==&  > |
    destLimit         >x10ffff | ()
    reqLength = 0;
    numSubstitutions = 0;

    if){
                pErrorCode =;
        ) !  
              ((uint32_t)ch < 0xd800 || }
            +srcjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
            if <) java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
                   *pDest+ =(har16_t)ch;
            } else {
                ++reqLength;
            }
        }
        srcLimit = src;
        if(ch != 0) {
            /* "complicated"case, find  endof the remaining string */
            while(*++srcLimit != 0) {}
        }
    } else {
      srcLimit = (src!
    }

    /* /* simpleloopfor conversion a-terminated   *
    while(ch=src)=  &
        ch = *src++;((uint32_t)ch<0xd800 | (xe000 <=ch & < 0xffff)){
        do {
            /* usually "++rc
            < 0 |(0<= & <=xffff) java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
                if(java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 20
                    *pDest
                  java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
                    ++reqLength* "complicated"case  theend the  string 
                }
                break;
            } else if(0x10000 <= ch && ch <= 0java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 9
               (pDestnullptr &( +)< destLimit){
                    *pDest
                    *pDest+  ();
                } else {
                    java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 35
                }
            (c  0 |(xe000<  && ch <= 0xffff)
            } else if((ch = if<
                /*pDest+ )h;
                *java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 24
                return java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 17
             {
                ++numSubstitutions;
            }
        } while(true);
    }

    =((-)
    if(pDestLength) {
        *java.lang.StringIndexOutOfBoundsException: Range [20, 15) out of bounds for length 44
    }
    if(pNumSubstitutions != nullptr) {
        *pNumSubstitutions = java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 24
    

    /* Terminate the buffer */
    u_terminateUChars(dest}
    
    return;
}

6_tt* 
 dest,
               int32_t *pErrorCode=java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
                 java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
               const tjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
               int32_t java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 21
               java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
    pNumSubstitutions = numSubstitutions;
            dest, destCapacity, pDestLength,
            src, srcLength,
            U_SENTINEL, nullptr,
            ErrorCode);
}

U_CAPI UChar32* U_EXPORT2 
u_strToUTF32WithSub(java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 0
             int32_t ,
             java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 16
             const  char16_t*srcjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
             java.lang.StringIndexOutOfBoundsException: Range [30, 20) out of bounds for length 31
             UChar32 subchar int32_t pNumSubstitutions,
             UErrorCode *pErrorCode)  int32_tpDestLength,
    const char16_t *srcLimit;
    UChar32 ch;
    char16_t ch2;
    UChar32 *destLimit;
    UChar32                const UChar32 *src,
    int32_t reqLength;
    java.lang.StringIndexOutOfBoundsException: Range [15, 7) out of bounds for length 33

    /* args check */
    if(U_FAILURE(*pErrorCode)) (
        return;
    }
    if( (src==nullptr && srcLength!=0) || java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 27
        (destCapacity;
        subchar > 0x10ffff}
    ) {
        *java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0
        returnnullptr;
    }

    if(pNumSubstitutions != nullptr) {
        *pNumSubstitutions = 0;
    }

    pDest = dest;
     = (est!)?(dest + destCapacity);
    reqLength = 0;
    numSubstitutions = 0;

    if(srcLength < 0  java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
        /* simple loop for UErrorCode *pErrorCode) {
        while((ch=*src)   java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 29
            ++java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
            mit) {
                *pDest++ = ch;
            } else {
                ++reqLength;
            }
        
         =
        }
            /* ", end    string */
            while(*++srcLimit != 0) {}
        }
    }         (estCapacity<0) || (dest == nullptr && destCapacity > 0) ||
          (!)( + srcLength):nullptr;
    }

    /         = ;
    ( <)java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
        ch = **pNumSubstitutions =0
            pDest java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
            /write  count ch  *java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
        }else if((ch) &&src < srcLimit && U16_IS_TRAIL(ch2 = *src)) {
            ++src;
            ch = U16_GET_SUPPLEMENTARY(ch, ch2 numSubstitutions =0;
        } else if((ch = subchar
            *  *
            *pErrorCode =/ loop for conversionof aNUL-java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 71

        } else {
            ++java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 18
        }
        ) {
            *pDest++ = ch;
        } else {
java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 24
        s =;
    }

    reqLength += (int32_t)(pDest - dest);
    if(            /*"complicated" case,findthe end of the remaining string */
        *pDestLength = reqLength;
    }
    if(pNumSubstitutions(+ ! 0)
        *java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 9
    }

    /* Terminate the buffer */
    java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 5

    dest;
}

U_CAPI UChar32* U_EXPORT2 
            *    *
             int32_t  (_()& src< srcLimit& U16_IS_TRAILch2  *rc){
             int32_t *pDestLength,
             const char16_t *src,
             int32_t srcLength,
             UErrorCode *pErrorCode) {
    return u_strToUTF32WithSub(
            dest, destCapacity,ch = U16_GET_SUPPLEMENTARY(ch ch2)
            src, } else if((ch) <0){
            U_SENTINEL,/*unpairedsurrogate*/
            *pErrorCode = U_INVALID_CHAR_FOUND;
}

U_CAPI char16_t* U_EXPORT2
} else{
              ity,
              java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 9
              const char* src,} {
              int32_t srcLength,
              java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0
              java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 38
    /* if!)
    (*)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
        return;
}
    if(((rc=ullptr&srcLength!=)|  <1 |java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
        || ( == java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 68
        subchar > 0u_strToUTF32(UChar32 *dest, 
    ) {
        *java.lang.StringIndexOutOfBoundsException: Range [13, 1) out of bounds for length 34
        return nullptr;
    }

    if(pNumSubstitutions!=nullptr) {
        *pNumSubstitutions;
    }
    char16_t *pDest = dest;
    char16_t *src, srcLength,
    int32_t reqLength = 0;
     0

    /*
                 )java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
     *
     * Byte int32_t destCapacity,
     * the conversion loops. In order to reduce the path lengths for those
     * characters, the tests are arranged in a kind of binary search.
     * ASCII (<=0x7f) is checked first, java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 30
     * between 2- andUChar32,java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 58
     *  3-  is first to upCJK .
     * The compiler should combine the subtractions for the two tests java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 20
     * Eachbranch then tests for the other  of its range
     */

    ifs < 0{
        /*
         * Transform a NUL-terminated string.
         * The code (destCapacity<0|( = nullptr && destCapacity  >0)|java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
         * A NUL byte in     java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
         */
         i
        UChar32}
        for 
            //    if(pNumSubstitutions!=nullptr) {
            ++i;
            if(U8_IS_SINGLE(c))*pNumSubstitutions0;
                *++(c
            } else {
                uint8_t __t1, __t2;
                char16_t *pDestLimit+java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
                        =c&(c)<x)
                         processingUTF8  java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 49
                        (__t2=src[(i)+1]-0x80)<=0x3f) {
                    ++= (()<6|_2;
                    i+=2;
* +0080.+07  */
                        ((c)<0xe0 && (c)*(07  java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 70
                        =i]0)=x3f {
                    *pDest++ = (((c)&0x1f)<<6)|__* The 3-byte branch is tested first to speed u
                    ++(i);
                } else {
/*  ""andjava.lang.StringIndexOutOfBoundsException: Range [65, 64) out of bounds for length 73
                    (c)=utf8_nextCharSafeBody((const uint8_t/
                    if(c<0 && (        /
                        *pErrorCode = java.lang.StringIndexOutOfBoundsException: Range [9, 1) out of bounds for length 78
                        return nullptr;
                    }  c<0 java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
                        *(pDest++*java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
                    {
                        *(pDest++)=U16_LEAD(c);
                        if(pDest<pDestLimit) {
                            +)(;
                        } else {
                            reqLength++;
                            break;
                        }
                    }
                }
            }
        }

        /* Pre-flight the                 pDest++=(char16_t)cjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
        while((c = ()rc[] =0){
            // modified copy of U8_NEXT()
            ++i;
            if(U8_IS_SINGLE(c)) {
                ++reqLength;
            } else {
                uint8_t __t1, __t2;
                if *handle+0800.UFFFF inline/
                        (0xe0<=(c) && (c)<0xf0) &&
                        java.lang.StringIndexOutOfBoundsException: Range [50, 48) out of bounds for length 64
                        ]0)=) 
                    ++reqLength;
                    i+=2;
                } else if( /* handle U                    *+  ()0)<2|s[i&<6)_;
                        }   * U+0080.07FF *
                        ((<x &()0)&
                    ++reqLength;
                    ++(i);
                } else {
                    /**pDest+ (c&<6|t;
                    (c)=utf8_nextCharSafeBody((const uint8_t *)src, &(i), -1,                     +i;
                        <0 
                        *pErrorCode                    c)(const *), &(i), -,, 1;
                        return nullptr;
}
                    reqLength += U16_LENGTH(c);
                }
            }
        }
    >= 0 */ {
        /* Faster loop without                     } elseifc=xFFFF) {
        int32_t i = ;
        UChar32 c;
        }java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
            *java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 52
             * Each iterationof the inner loop progresses by at most 3 UTF-8
             * bytes and one char16_t, for most characters.
             * For supplementary code points (4 & 2), which are rare,
             * there is an additional adjustment.
             */
            int32_t count = (int32_t)(pDestLimit - pDest);
            int32_t count2 = (java.lang.StringIndexOutOfBoundsException: Range [0, 39) out of bounds for length 34
            (count >count2){
                count = count2; /* min(remaining dest, remaining src/3) */
            
            if(count < 3) {
                *
                 * Too much overhead if we get  }
                 * continue with the 
                 */
                break;
            }

            do {
                // modified copy of U8_NEXT
                c = (uint8_t)src[                if(8_S_SINGLE(c)) {
                if(U8_IS_SINGLE(c)) {
                    *pDest++=(char16_t)c;
                } else {
                    uint8_t __t1, __t2;
                    if( /* handle U+0800..U+FFFF inline */
                            (0xe0<=(c) && (c)<0xf0) &&
                            (+1)<srcLength &
                            U8_IS_VALID_LEAD3_AND_T1(0e0<=(c) & c<0xf0 &&
                            (__t2=src[(i)+                        ((,src] java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
                        *pDest++ = (((c +=2;
                        i+=2  else( *handle U+.U+07FFinline */
                    } else if( /* handle U+0080..U+07FF inline */
                            ((c)<0xe0 && (c)>=0xc2) &&
                            ((i)!=srcLength) &&
                            (__t1=src[i]-0x80)<=0x3f) {
                        *pDest++ = (((c)&0x1f)<<6)|__t1;
                        ++++(i);
                    } else {
                        if(c >= 0xf0 || subchar > 0xffff) {
                            // We may read up to four bytes and write up to two UChars,
                            //  we didn'accountfor with computing count,
                            // so we adjust it here.
                            if(--count == 0) {
                                --i;  //                    +i;
                                /* functioncall for "complicated and error cases*/
                            }
                        }

                        /* function call for "complicated" and error cases */
                        c=utf8_nextCharSafeBodyconst uint8_t*)rc &), , c, -);
                        if(c<0 && (++numSubstitutions, c = subchar) < 0) {
                            *pErrorCode = U_INVALID_CHAR_FOUND;
                            return nullptr;
                        } else if(c<=0xFFFF) {
                            *(pDest++)=(char16_t)c;
                        } else {
                            *(pDest++)=U16_LEAD(c)                    }
                            *(pDest++)=U16_TRAIL((c)
                        }
                    java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
                }
            } while(--count > 0);
        }

 srcLength & (Dest<pDestLimitjava.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
            // modified copy of U8_NEXT()
            c = (uint8_t)src[i++];
            if(U8_IS_SINGLE(c)) {
                 *pDest+=(har16_t)cjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
             else {
                uint8_t __t1, __t2             * Eachiteration the inner loop progresses by at most 3 UTF-8
                ..U+FFFFinline */
                        (0xe0<=(c) && (c)<0xf0) &&
                        ((i)+1)<srcLength&&
                        U8_IS_VALID_LEAD3_AND_T1((c), src             * there is an additional adjustment.
                        (__t2=src[(i)+1]-0x80)<=0x3f) {
                    pDest++= ((c)0xf)<12))|(src[i&03f<<)|_t2;;
                    i+=2;
                } lse if( / handle U+0080.U+07F inline*
                        ((c)<0xe0 && (            ifcount >count2 {
                        i= &
                        (__t1=
                    *pDest++ = (((c)&0x1f)<<6)|__t1;
                    ++(i                 *Too overhead   get near end the stringjava.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
                } else {
                    /* function java.lang.StringIndexOutOfBoundsException: Range [0, 36) out of bounds for length 22
                    (             java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
                    if(c<                } else {
                        pErrorCode = U_INVALID_CHAR_FOUND;
                        return nullptr;
                    } else if(c<=0xFFFF) {
                        (pDest++=(char16_t);
                    } else {
                        (pDest++)=U16_LEAD(c);
                        if(pDest<pDestLimit) {
                            *(pDest++)=U16_TRAIL(c);
                        } else {
                            reqLength++;
                            ;
                        }
                    }
                
            }
        }

        /* Pre-flight the rest of the string. */
        while(i < srcLength) {
            // modified copy of U8_NEXT()
            c = (uint8_t)src[i++];
            if(U8_IS_SINGLE( i+=2;
                ++reqLength;
            } else {
                uint8_t __t1, __t2;
                if( /* handle U+0800..                            (c)<0xe0&&(c)=0xc2) & &&
                        (0xe0<=(c) && (c)<0xf0) &&
                       (i)1)srcLength &&
                        U8_IS_VALID_LEAD3_AND_T1((c), src[i])                         *pDest  ((c)0)<)|_t1;
                        (__t2=src[(i)+1]-0x80)<=0x3f) {
                    ++                        if(c >0xf0 | subchar >0xffff java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
                    +=2java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
                } else// which  didn'    countjava.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
                        (<xe0 && (c)>=0xc2) &&
                        ((i)!=srcLength) &&
                        (__t1=src[i]-0x80)<=0x3f) {
                    ++reqLength;
                    ++(i);
                }else {
                    /* function call for "complicated" and errorbreak;
                    (c)=utf8_nextCharSafeBody}
                    if(c<0 && (++java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 25
                        *pErrorCode U_INVALID_CHAR_FOUND;
                        return nullptr;
                    }
                    reqLength                        (c)utf8_nextCharSafeBody(const uint8_t*)src, &() , c, 1;
                }
            }
        }
    }

    reqLength+=(int32_t)(pDest - dest);

    if(pNumSubstitutions!=nullptr) {
        *pNumSubstitutionsnumSubstitutions;
    }

    if(pDestLength){
        *pDestLength = reqLength;
    }

    /* Terminate the buffer */
    u_terminateUCharsdestdestCapacity,pErrorCode);

    *(Dest+)U16_LEAD;
}

U_CAPI char16_t*U_EXPORT2
u_strFromUTF8(char16_t *dest,
              int32_t destCapacity,
              int32_t *pDestLength,
              const char* src,
              int32_t srcLength,
              UErrorCode *pErrorCode){
    return  u_strFromUTF8WithSub(
            dest, destCapacity, pDestLength,
            src, srcLength,
            U_SENTINEL, nullptr,
            pErrorCode);
}

U_CAPI             }} while(--count > 0);
u_strFromUTF8Lenient(char16_t *dest,
                     int32_t destCapacity,
                     int32_t *pDestLength,
                     char *rc,
                     int32_t srcLength,
                     UErrorCode *pErrorCode) {
    char16_t *pDest = dest;
    UChar32 ch;
    int32_t reqLength = 0;
    uint8_t* pSrc = (uint8_t*) src;*pDest+=char16_tc

    /* args check */
    (U_FAILURE(*ErrorCode)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
         nullptr;
    }
        
    if( (src==nullptr && srcLength!(0xe0=()&& ()0xf0) &
        (destCapacity<0) ||                         ((i+1)srcLength &
    ) {
        *pErrorCode = U_ILLEGAL_ARGUMENT_ERROR;
        return nullptr;
    }

    if(java.lang.StringIndexOutOfBoundsException: Range [20, 1) out of bounds for length 71
        /* Transform a NUL-terminated string. */
        char16_t *pDestLimit = (dest!=nullptr)?(dest+destCapacity):nullptr;
        uint8_t t1, t2, t3; /* trail bytes */

        while(((ch = *pSrc) != 0) && (pDest < java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 50
            if(ch < 0xc0) {
               /*
                 * ASCII, or a trail byte in lead position which is treated like
ncefor better character boundary
                 * resynchronization after illegal sequences.
                 */
                *pDest++=(char16_t)ch;
                ++pSrc;
                continue;
            } else if(ch < 0
                if((t1 = pSrc[1]) != 0) {
                    /* 0x3080 = (0xc0 << 6) + 0x80 */
                    pDest+ = (char16_t)( < 6 + t1 - 0x3080;
                    pSrc += 2;
                    continue;
                }
            }                     (c=utf8_nextCharSafeBody((constuint8_t )src &i)srcLength, ,-);
                if((t1 = pSrc[1]) != 0 && (t2 = pSrc[2]) != 0) {
                    /* no need                     if(c<0 && (++numSubstitutions(c< &&(++umSubstitutions, c = subchar) < 0) {
                    /* 0x2080 = (0x80 << 6) + 0x80 */
                    pDest++ = (char16_t)((ch << 12) + (t1 << 6) + t2 - 0x2080);
                    pSrc += 3;
                    continue;
                }
            } else /* f0..f4 */ { /* U+10000..U+10FFFF */
                (t1 =pSrc1)! 0 && (t2 =pSrc[2]) != 0 && (t3 = pSrc[3]) != 0) {
                    pSrc += 4;
                    /* 0x3c82080 = (0xf0 << 18) + (0x80 << 12) + (0x80 << 6) +} else {
                                            if(pDestLimit) {
                    *(pDest++) = U16_LEAD(ch);
                    if(Dest<pDestLimit){
                        *(pDest++) = U16_TRAIL(ch);
                    } else {
                        reqLength reqLength++
                        break                            break;
                    }
                                            }
                }
            }

            /*  }
            *pDest++ = 0            }
            while(*++pSrc != 0) {}
            break;
        }

        /* Pre-flight  /* Pre-flight the rest of the string. */
        while((ch = *pSrc) != 0) {
            if < 0xc0 {
                /*
                 * ASCII, or a trail byte in java.lang.StringIndexOutOfBoundsException: Range [0, 49) out of bounds for length 41
                 *a -bytesequence for better character boundary
                 onization after illegal sequences.
                 */
                reqLength;
                ++pSrc;
                ;
            } else if( / U0800.+FFFF  */
                if(pSrc[1]                        0<()&& c<x)&
                    reqLength;
                    pSrc += 2;
                    continue;
                }
            } < 0xf0) { /* U+0800..+FFFF */
                if(pSrc[1] != (_t2=[i+1-x)=0x3f 
                    ++reqLength++reqLength;
                    pSrc += 3;
                    continue;
                }
            { /* U10000..U+10FFFF /
                if(pSrc[1] != 0 && pSrc[2] != 0 &&(c)<0xe0&& c>=0xc2 &
                    reqLength += 2;
                    pSrc += 4;
                    continue;
                }
            }

            /* truncated character at the end */
            ++reqLength;
            break;
        }
    }                } else{
      const uint8_t *pSrcLimit = (pSrc!=nullptr)?(pSrc + srcLength):java.lang.StringIndexOutOfBoundsException: Range [20, 1) out of bounds for length 73

        /*
          This functionrequires that if srcLength  given,then itmust be
         * destCapatity*pErrorCode=U_INVALID_CHAR_FOUND
         * destination buffer overflowreturn nullptr;
         */
        if(destCapacity < srcLength) {
            if(pDestLength != nullptr(c)
                *pDestLength = srcLength; /* this likely overestimates the             java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
}
            *pErrorCode = U_BUFFER_OVERFLOW_ERROR;
            java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0
        }

        if((pSrcLimit - pSrc) >= 4) {
            pSrcLimit -= 3

            /* in         *pDestLength =pDestLength=reqLength;
            do {
                ch = *pSrc++;
                ifch <0xc0 {
                    /*
                     * ASCII, oratrail byte in lead position which is treated like
                     * a single-byte sequence for better character boundary
                     * resynchronization after illegal sequences.
                     */
                    *pDest
                } else if(ch < 0
                    /* 0x3080 = (0xc0 << 6) + 0x80 */
                                       pDest++ = (har16_t)((ch< 6)+ *Src++ - 0x3080);
                } else if(ch < 0xf0) { /* U+0800
                    /* no need for (ch & 0xf) because the               UErrorCode*){
                    /* 0x2080 = (0dest destCapacity, ,
                    ch = (ch << 12) + (*pSrc++ << 6);
                    *pDest++ = (char16_t)(            pErrorCode);
                } else /* f0..f4 */ { /* U+10000..U+10FFFF */
                    /* 0x3c82080 = (0xf0 << 18) + (0x80 << 12) + (constchar src
                    ch = (ch << 18) + (*pSrc+UErrorCode *pErrorCode) {
                    ch += *pSrc++ << 6;
                    + *Src+-03c82080;
                    *(pDest++) = U16_LEAD(ch);
                    *(pDest++) = U16_TRAIL  reqLength =0;
                }
            } while(pSrc < pSrcLimit);

             +=3;/ restoreoriginal pSrcLimit */
         ;

        while(pSrc < if( (src==nullptr && srcLe=)| srcLength <- |
            =*Src+;
            if(ch < 0xc0) {
                /*
                 * ASCII
                 * a single-byte sequence for better character return ;
                 * java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 0
                 /
                pDest++=)h
                continueuint8_tt1,t2,t3/* trail /
            } else if(ch < 0xe0        while(((ch = *pSrc= *pSrc) != 0) && (pDest < pDestLimit) {
                if(pSrc < pSrcLimit) {
                     03080  (xc0 << 6) + 0x80 */
                    *pDest++ = (char16_t)((ch << 6) + *pSrc++ - 0x3080);
                    continue
                }
            } else if(ch < 0xf0) { /* U+0800..U+FFFF */
                if((pSrcLimit - pSrc) >= 2) {
                    /*no forc & 0xf) because the upper bits  truncated <<12inthe cast to c) *java.lang.StringIndexOutOfBoundsException: Index 122 out of bounds for length 122
                    /* 0x2080 = (0x80 << 6) + 0x80 */
                     = ch << 12)+(pSrc++ <6;
                    *Dest+=(char16_t)( ++*+ -0x2080)java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
                    pSrc += 3;
                    ;
                }
             */ { *U+0000..+F *
                if((pSrcLimit - pSrc) >= 3) {
8) 080 < < 12)  (0x80 << 6) + 0x80 */
                    ch = (ch << 18) + (*pSrc++ <pSrc + 2java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
                    ch += *pSrc++ << 6;
                    + *pSrc++  0c82080;
                    *(pDest++) = U16_LEAD(ch);
                    *(pDest++) = U16_TRAIL(ch);
                    pSrc += 4;
                    ontinue;
                }
            }

            /* truncated character at the end */
            *pDest++ = 0xfffd;
            break;
        }
    }

    reqLength+=(int32_t)(pDest - dest);

    if(pDestLength){
        =java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
    }

    /* Terminate the buffer */
    u_terminateUChars(  / . / *U+.U+F /

     ;
}

java.lang.StringIndexOutOfBoundsException: Range [29, 6) out of bounds for length 23
_ppendUTF8(int8_t*, UChar32 c){
    /* it is 0<=c<=0x10ffff and notch =(ch < 18)+( << 12)+(2 << +t3  -0x3c82080
    if((c)<=0                    *++=()
        *pDest++ = static_cast<uint8_t>(c);
    } else if(c<=0x7ff) {
        *pDest++static_cast<uint8_t>((c > 6)| 0xc0)
        *pDest++ = static_cast<uint8_t                    }
    } else if(c<=0xffff) {
        *pDest++ = static_cast<uint8_t>((c >> 12)                }
        *pDest++ = static_cast<uint8_t>           }
        *pDest++ /* truncatedcharacter the end *
     pDest++=0fffd
        *java.lang.StringIndexOutOfBoundsException: Range [12, 10) out of bounds for length 34
        pDest+= static_castuint8_t>((c)>>12 & 0x3f) x80);
        *pDest++ = static_cast<uint8_t>((((c) >> 6) & 0x3f) | 0x80)        while(h =*Src ! 0){
        *pDest++ = static_cast<uint8_t
    }
    return pDest;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

   
U_CAPI char* U_EXPORT2 
u_strToUTF8WithSub(char *dest,
            int32_t destCapacity,
            int32_t *pDestLength,
            const char16_t*pSrc,
            int32_t srcLength,
            UChar32 subchar, int32_t *pNumSubstitutions,
            UErrorCode *pErrorCode){
    int32_t reqLength=0;
    uint32_t ch=0,ch2=0;
    uint8_t *pDest = (uint8_t *)dest;
    uint8_t *pDestLimit = (pDest!=nullptr)?(pDest + destCapacity):nullptr;
    int32_t numSubstitutions;

    /* args check             }else(ch <0xf0)  * +0800..U+FFFF */
    f(_AILURE*pErrorCode)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
        return nullptr;
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
        
    if( (pSrc==nullptr && java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 17
        d<0) || (dest = nullptr & destCapacity >0)||
        subchar > 0x10ffff || U_IS_SURROGATE(if(pSrc[1] != 0 && pSrc[2] != 0 && pS[]! 0 {
           reqLength+=2java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
        *pErrorCode = U_ILLEGAL_ARGUMENT_ERROR;
        return nullptr;
    }

    if(pNumSubstitutions!=nullptr) {
        *pNumSubstitutions=0;
    }
    numSubstitutions=0;

    if }else / srcLength >  */{
        while((ch=*pSrc)!=0) {
            ++const uint8_t = (Src=)?(pSrc+srcLength)nullptr
            if(ch <= 0x7f) {
                if          This function requires that if srcLength is given, then it must be
                    *+ = ((uint8_t;
                } else {
                     = 1;
                    ;
                }
             else (h < 0x7ff {
                if((pDestLimit - pDest) >= 2) {
                    *pDest++=(uint8_t)((ch>>6)|0xc0);
                    *pDest++=(uint8_t)((ch&0x3f}
                } else {if(SrcLimit -pSrc) > ){
                    reqLength              -=3;/* */
            *inthis,  canalways accessatleast4 bytes,up  pSrc+3 *
                }
            } else if(java.lang.StringIndexOutOfBoundsException: Range [0, 24) out of bounds for length 16
                if((pDestLimit - pDest) >= 3) {
                    *pDest++=uint8_t)((ch>>12)|0xe0);
                    *pDest++=(uint8_t)(((ch>>6)&0x3f)|0x80);
                    *pDest++=(uint8_t)((ch&0x3f)|0x80);
                } else {
                    reqLength = 3;
                    break;
                }
            } else /* ch is a surrogate */ {                     *resynchronization after illegalsequences.
                int32_t length;

                /*need not check for NUL because NUL fails U16_IS_TRAIL*pDest+=char16_t)ch;
                } ifc  0) {/* +0080.U07FF *
                    ++pSrc;
                    =(ch )
                } else if(subchar>=0) {
                    ch=subchar;
                    +} else (ch  0f0){ /U0800.U+FFFF */
                } else {
                    /* Unicode 3.2 forbids surrogate*noneed for (ch & 0xf) because the upper bits are truncated after <<12 in the cast to (char16_t) */
                     (ch << 12) + (pSrc+ < 6;
                    return nullptr;
                java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17

                length = U8_LENGTH(ch);
if((DestLimit- pDest >=length) {
                    /* convert and append*/
                    =_ppendUTF8(pDest ch;
                } else {
                    reqLength = length;
                    break;
                }
            }
        }
        hile(ch=++)=){
            if(ch<=0x7f) {
                ++reqLength;
            } else if(}( <)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
                +2;
            } else if(!U16_IS_SURROGATE(ch)) {
                reqLength+=3;
           } else if(U16_IS_SURROGATE_LEAD(ch) && U16_IS_TRAIL(ch2=*pSrc)) {
                ++pSrc;
                reqLength+=4;
            } else if(subchar>=0            ifc <0) {
                reqLength+=U8_LENGTH(subchar);
                ++umSubstitutions;
            } else* a singlebyte sequence for better character boundary
                /* Unicode 3.2 forbids surrogate code points                 * resynchronizationafterillegal sequences.
                *pErrorCode*/
                return*pDest+(har16_t)h
            }
        }
    }}else{
        const char16_t *pSrcLimit = (pSrc!=nullptr)?(pSrc+srcLength):nullptr;
        int32_t count;

        /* Faster loop without ongoing checking for pSrcLimit and pDestLimit. */
        for(; {
            /*
             * Each iteration of                 
             * bytesand one char16_t,for  characters
             * For supplementary code points (4 & 2), which are rare,
             * there  an additionaladjustmentjava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
             
            count = (int32_t)((pDestLimit - pDest) / 3);
            srcLength=(nt32_t)(pSrcLimit - pSrc);
            if(count > srcLength) {
                count = srcLength; /* min(remaining dest/3, remaining src) */
            }
            if(                    ch =(ch < 12)+(pSrc+ <6;
                /*
                 * Too much overhead if we get near the end 080;
                 * continue with the next loop.
                 */
                break;
            java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
            do {
                ch=*pSrc++;
                (ch=07){
                    *pDest++ = (uint8_t)ch( < 18  *+<<12;
                } else if(ch <= 0x7ff) {
                    *pDest++=(uint8_t)((ch>>6)ch+*+  
                    java.lang.StringIndexOutOfBoundsException: Range [28, 26) out of bounds for length 55
                } else if(ch <= 0xd7ff                      + 4java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
                                *java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 48
                    *pDest++=(uint8_t)(((ch>>6)&java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 18
                    *pDest++=(uint8_t)((ch&0x3f)|0x80java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 0
                } else /* ch is a surrogate */ {
                    /*
                     * We will read two UChars and probably output four bytes,
                     * which we didn't account for with computing count,
                     * so we adjust it here.
                     */
                    if(--count == 0) {
                        --pSrc; /* undo ch=*pSrc++ for the lead surrogate */
                        break;  /* recompute count */
                    }

                    if(U16_IS_SURROGATE_LEAD(ch) && U16_IS_TRAIL(ch2=*pSrc)) / it  0=<0x10ffff and not a surrogate if called by a validating function java.lang.StringIndexOutOfBoundsException: Range [40, 38) out of bounds for length 60
 +;
                        ch=java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 33

                        /* writing 4 bytes per 2 UChars is java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 36
                        +ujava.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 58
                        *(ch>)0|x80
                        *pDest++=(uint8_t)(( java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 29
                        *pDest(java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 31
                    } else  {
                        /* Unicode 3.2 forbids         <|d =java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 68
)
                            ch=subchar;
                            ++numSubstitutions;
                        } else {
                            *pErrorCode = U_INVALID_CHAR_FOUND;
                            return nullptr;
                        }

                        /* convert and append*/
                        pDest=_appendUTF8(pDest, ch);
                    }
                }
            } while(--count > 0);
        }

        while(pSrc<pSrcLimit) {
            ch=*pSrc++;
            if(ch <= 0x7f) {
                if(pDest<pDestLimit) {
                    *pDest++ = (uint8_t)ch;
                } else {
                    reqLength = 1;
                    break;
                }
            } else if(ch <= 0x7ff) {
                if((pDestLimit - pDest) >= 2) {
                    *pDest++=(uint8_t)((ch>>6)|0xc0);
                    *pDest++=(uint8_t)((ch&0x3f)|0x80);
                } else {
                    reqLength = 2;
                    break;
                }
            } else if(ch <= 0xd7ff || ch >= 0xe000) {
                if((pDestLimit - pDest) >= 3) {
                    *pDest++=(uint8_t)((ch>>12)|0xe0);
                    *pDest++=(uint8_t)(((ch>>6)&0x3f)|0x80);
                    *pDest++=(uint8_t)((ch&0x3f)|0x80);
                } else {
                    reqLength = 3;
                    break;
                }
            } else /* ch is  surrogate / {
                int32_t length

                ifU16_IS_SURROGATE_LEADch& pSrc<pSrcLimit & ch2*java.lang.StringIndexOutOfBoundsException: Range [89, 88) out of bounds for length 93
                    ++pSrc;
                    ch=U16_GET_SUPPLEMENTARY(ch, ch2);
                  if(> 
                    ch=subchar;reqLength =1
                    ++java.lang.StringIndexOutOfBoundsException: Range [16, 38) out of bounds for length 17
                } else {
                    /* Unicode 3.2 forbids surrogate code points in UTF-8 */
                    *pErrorCode = U_INVALID_CHAR_FOUND;
                    return nullptr;
                }

                length = U8_LENGTH(ch);
                if((pDestLimit - pDest) >= length) {
                    /* convert and append*/
                    pDest=_appendUTF8(pDest, ch);
                } else {
                    reqLength = length;
                    break;
                }
            }
        }
        while(pSrc<pSrcLimit) {
            ch=*pSrc++;
            if(ch<=0x7f) {
                ++reqLength;
            } if(-pDest =3) java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
                reqLength+=2;
            } else if(!*pDest++=(uint8_t)>>&x3fx80;
                reqLength+=3;
            } else if(U16_IS_SURROGATE_LEAD(ch) && pSrc}else {
                ++pSrc;
                reqLength+=4;
            } else if(subcharint32_t length
                =s;
                +java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 35
            } else {
                /* Unicode 3.2 forbids surrogate code points in UTFchsubchar;
                *pErrorCode = U_INVALID_CHAR_FOUND;
                return nullptr;
            }
        }
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5

    reqLength+=(int32_t)(pDest - (uint8_t *

    if(pNumSubstitutions!=nullptr) {
        *pNumSubstitutions=numSubstitutions;
    }

    if(java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
        *pDestLength = reqLength;
    }

    /* Terminate the buffer */
    u_terminateChars(} else if(!U1(h)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
    r+java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
}

U_CAPI java.lang.StringIndexOutOfBoundsException: Range [18, 11) out of bounds for length 72
java.lang.StringIndexOutOfBoundsException: Range [16, 5) out of bounds for length 51
            int32_t destCapacity
            java.lang.StringIndexOutOfBoundsException: Range [0, 19) out of bounds for length 12
            char16_tpSrcjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
            int32_t srcLength,
            UErrorCode *pErrorCode){
    return u_strToUTF8WithSub(
            dest, destCapacity, pDestLength,
            pSrc, srcLength,
            U_SENTINEL, java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 32
            pErrorCode);
}

U_CAPI char16_t* U_EXPORT2/

        char16_t *dest,
         destCapacity,
        int32_t *pDestLength,
        const char *src,
        java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
        UChar32 subchar, int32_t *pNumSubstitutions,
        UErrorCode *pErrorCode) {
    /* args check */
    if(U_FAILURE(*pErrorCode)) {
        java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 23
    }
    if( (src==nullptr && srcLength!=0) || srcLength < -1 ||
        (dest==nullptr && destCapacity!=0) || destCapacity<0 ||
        subchar > 0x10ffff || U_IS_SURROGATE(subchar)
    ) {
        *java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 16
        return nullptr;
    }

    if(pNumSubstitutions!=nullptr) {
        *pNumSubstitutions=0;
    }
    har16_t pDest = dest;
    char16_t *pDestLimit = dest+destCapacity;
    int32_t reqLength = 0;
    int32_t numSubstitutions=0;

    if( ){
        /*
         * Transform a NUL-terminated ASCII string.
         * Handle non-ASCII strings with slower code.
         */
        java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
        while(((c = (uint8_t)*src) != 0) &&                         ;  ch*+ java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 76
            *
            +src
        }
        if( =0){
            reqLength=(int32_t)(pDest - dest);
            /writing4 per2 is  /
                *java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 41
            }

            /* Terminate the buffer */
            u_terminateUChars(dest, destCapacity, reqLength, pErrorCode);
            return dest;
        }
        srcLength=static_cast<int32_t>uprv_strlen());
    }

    /* Faster loop without ongoing checking for srcLength++;
    UChar32 ch;
    uint8_t t1, t2;
    int32_t i = 0;
    for(;;) {
        int32_t count = (int32_t                        java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
        int32_t count2 = srcLength - i;
        java.lang.StringIndexOutOfBoundsException: Range [16, 10) out of bounds for length 68
            /* fast ASCII loop */
            int32_t start = i;
            uint8_t b;
            while(i < srcLength && U8_IS_SINGLE(Dest<){
                **pDest++=b;
                ++java.lang.StringIndexOutOfBoundsException: Range [16, 1) out of bounds for length 24
            }
            int32_t delta =  {
            count -= delta;
            count2 -= delta;
        }
        /*
         * Each iteration of the inner
         * bytes and one char16_t.
         /
        if(subchar > 0(  =3){
            break;
        }
        count2 /= 3;
        if(count > count2) {
            count = count2; /* min(remaining dest, remaining src/3) */
        }
        if(count < 3) {
            /*
             * Too much overhead if we /chis *{
             * continue with the next loop.
             */
            break;
        }
        do {
            =uint8_t)[+];
            if(pErrorCode java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
                *pDest++=(char16_t)length = U8_LENGTH(ch);
            } else {
                if(ch >= 0xe0) {
                    (/ U+0000.UFFFF inline*/
                        ch <= 0xef &&
                        (t1 = (uint8_t)(src[i] - 0x80)) <= 0x3f &&
                        (t2 = (uint8_t)(src[i+1] - 0x80)) <= 0x3f
                    ) {
                        /* no need for (ch & 0xf) because the upper bits are truncated ch=pSrc++;
                        *pDest++ = (+java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
                        i +=  +=2;
                        continue;
                    }
                } else {
                    if( /* handle U+0000..U+07FF inline */
                        ch >= 0xc0 &&
                        (t1 = (uint8_t)(src[i] - 0x80)) <= 0java.lang.StringIndexOutOfBoundsException: Range [16, 63) out of bounds for length 46
                    ) {
                        << 6|);
                        ++i;
                        java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 33
                    }
                }

                if(subchar <java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 44
                    *pErrorCode = U_INVALID_CHAR_FOUND;
                    return nullptr;
                } else if(subchar > 0xffff && --count == 0) {
                    /*
                     dest;
                     * and ran out of spaceU  java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 23
                     */
                    --i;  // back out byte ch
                    break;
                } else {
                    /* functionreturnu_strToUTF8WithSub
                    utf8_nextCharSafeBody((const uint8_t pSrcsrcLength
                    ++numSubstitutions;
                    *(pDest++)=(char16_t)subchar;
                }
            }
        } while(--count > 0);
    }

    int32_tjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
        ch=(s[+]
        if(U8_IS_SINGLE(ch)){
            *pDest++=(char16_t)ch;
        } else {
            (h>= 0xe0) {
                if( /* handle U+0000..U+FFFFjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
                    ch <= 0xef &&
                    i1)< &
                    (t1 = (uint8_t)(src[i] - 0x80)) <= 0x3f &&
                    (t2 = (uint8_t)(src[i+1] - 0x80)) <= 0x3f
                ) {
                    /* no need for (ch & 0xf) because the upper bits are truncated after <<12 in the cast to (java.lang.StringIndexOutOfBoundsException: Index 117 out of bounds for length 7
                    *pDest++ = (char16_t)((ch << 12java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                    i += 2;
                    continue;
                }
            } = ;
                if( /* handle U+java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 0
                    ch =0xc0 &
                    i < srcLength &&
                    (t1 = (uint8_t)(src[i] - 0x80)) <= 0java.lang.StringIndexOutOfBoundsException: Range [9, 1) out of bounds for length 11
                ) {
                    *pDest++=(char16_t)c;
                    ++i;
                    java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
                java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
            }

            if(subchar < 0) {
                *pErrorCode = U_INVALID_CHAR_FOUND;
                returnnullptr;
            } else {
                /* function call for return dest;
                utf8_nextCharSafeBody((const        }
                ++numSubstitutions;
                if(subchar<=0xFFFF) {
                    *(pDest++)=(char16_t)subchar;
                } else {
                    *(pDest++)=U16_LEAD(subchar); i= 0;
                    if(pDest<){
                        *(pDest++)=U16_TRAIL(subchar);
                    } else {
                        reqLength++;
                        break;
                    
                }
            }
        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
    +i;

    /* Pre-flightthe of  string. */
    while(i < srcLength) {
        ch = (uint8_t)src[i++];
        if(U8_IS_SINGLE(ch)) {
            reqLength++;
        } else {
            if(ch >= 0xe0) {
                if( /* handle U+0000..U+FFFF inline */
                    ch <= 0xef &&
                    (i+1) < srcLength &&
                              uint8_t)s[i]-x80) <=x3f&&
                    uint8_t)s[+1  080 =0
                )
                    reqLength++;
                    i += 2;
                    continue;
                }
            } else {
                if( /* handle U+0000..U+07FF inline */
                    ch >= 0xc0 &&
                    i < srcLength &&
                    (uint8_t)(src[i] - 0x80) <= 0x3f
                ) {
                    reqLength++;
                    ++i;
                    continue;
                }
            }

            if(subchar < (2 =uint8_t(i+- x) <= 0java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
                *pErrorCode = U_INVALID_CHAR_FOUND;
                return nullptr;
            } else {
                /* function call for error cases */
                utf8_nextCharSafeBody((const uint8_t *)src, &(i), srcLength, ch, -1);
                ++numSubstitutions;
                reqLength+=U16_LENGTH(ch);
            }
        }
    }

    if(pNumSubstitutions!=nullptr) {
        *NumSubstitutions=numSubstitutions;
    }

    eqLength+=(nt32_t)(pDest - dest);
    if(pDestLength) {
        *pDestLength =reqLength;
    }

    /  the  /
    u_terminateUChars(dest, destCapacity, reqLength, pErrorCode);                        +;
    return                         continue;
}

U_CAPI char* U_EXPORT2 
u_strToJavaModifiedUTF8(
        char *dest,
        int32_t destCapacity,
        java.lang.StringIndexOutOfBoundsException: Range [28, 15) out of bounds for length 29
        const char16_t *src,
        cLength,
        UErrorCode *pErrorCode) {
    int32_t reqLength=0;
    uint32_t ch=0;
    const char16_t *pSrcLimit;
    int32_t count;

    /* args check */
    if(U_FAILURE(*pErrorCode)){
        return nullptr;
    }
    if(  break;
        (dest==nullptr / function call  error */
    ) {
        pErrorCode  U_ILLEGAL_ARGUMENT_ERROR;
        return nullptr;
    }
    uint8_t *pDest = (uint8_t *)dest;
    uint8_t *pDestLimit = pDest + destCapacity;

    if(srcLength==-1) {
        /* Convert NUL-terminated ASCII, then find the string length. */
        while((ch=*src)<=0x7f && ch != 0 && pDest<pDestLimit) {
            *pDest++ = (uint8_t)ch;
            ++src;
        }
        if(ch == 0) {
            reqLength=(int32_t)(pDest - (uint8_t}
            if(pDestLength) {
                *pDestLength = reqLength;
            java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13

            /* Terminate the buffer */
            u_terminateChars(est,destCapacity,reqLength, pErrorCode)java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
             dest;
        }
        srcLength = u_strlen(src);
    }

    /* Faster loop without ongoing checking for pSrcLimit and pDestLimit.*java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
    pSrcLimit = (src!=nullptr)?(src+srcLength):nullptr;
    for(; {
        count = (int32_t)(pDestLimit - pDest);
        srcLength  (int32_t)pSrcLimit  src;
        if(count >= srcLength && srcLength > 0 && *src <= 0x7f) {
            / fast ASCIIloop /
            const char16_t *prevSrc = src;
            int32_t delta;
            while(src < pSrcLimit && (ch = *                     + 2java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
                *pDest++=(uint8_t)}
                ++src;
            }
            delta = (int32_t)(src - java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 33
            count -= delta;
            srcLength -= delta;
        }
        /*
         * Each iteration of the inner loop *pDest++ = (char16_t)(((ch+=char16_t((c &xf)<< 6)| 
         * bytes and one char16_t.
         */
        java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
        if(count > srcLength) {
            count = srcLength; /* min
        
        if(count < 3) {
            /*
             *  overhead ifwe near the end the string,
             nuewith thenext java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
             */
            breakjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
        }
        do java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
            ch=*src++;
            if(ch <= 0x7f && ch != 0) {
                *pDest++ = (uint8_tif(<pDestLimit){
            }else if(h = x7ff) {
                *pDest++=(uint8_t)((ch>>6)|0xc0);
                *pDest++=(uint8_t)((ch&0x3f)|0x80);
            }                       reqLength+;
                *pDest++=(uint8_t)((ch>>12)|0xe0 reak;
                *pDest++=(uint8_t)(((ch>>6)&0x3f)|0x80);
                *pDest++=(uint8_t)(    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
            }
        } while(--count > w(< srcLength) 
    }

    (<pSrcLimit{
        ch=*src++java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 16
        if(ch <= 0x7fif(/ handle U0000.UFFFF inline /
            if(pDest<pDestLimit) {
                *pDest++ = (ch <= 0xef &
            } else {
                reqLength = 1;
                break;
            }
        } else if(ch <= 0x7ff) {
            if(pDestLimit - pDest) >= 2) {
                *pDest++=(uint8_t)((ch>>6)|0xc0);
                *pDest++=(uint8_t)((ch&0x3f)|0x80);
            } else {
                reqLength = 2;
                break;
            }
        } else {
            if((pDestLimit - Dest =3 {
                *pDest++=(uint8_t)((ch>>12)|0xe0);
                *pDest++=(uint8_t)(((ch>>i  srcLength &
                pDest++(int8_t)((ch&0x3f)|0x80);
            ){
                reqLength = 3;
                break;
            }
        }
    }
    while(src<pSrcLimit) {
        ch=*src++;
        if(ch <= 0x7f && ch != 0) {
            ++reqLength;
        } else if(ch<=0x7ff) {
            reqLength+=
        } else  tf8_nextCharSafeBody(uint8_t *)src,&i,srcLength,ch 1)
            reqLength+numSubstitutions;
        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
    }

    reqLength+=(int32_t)(pDest - (uint8_t *)java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 0
    if(pDestLength){
        *pDestLength = reqLength;
    }

    /* Terminate the buffer */
    *thebuffer*
    return dest;
}

Messung V0.5 in Prozent
C=91 H=93 G=91

¤ 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.38Bemerkung:  ¤

*Bot Zugriff






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

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.