Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  collationsets.cpp

  Sprache: C
 

// © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
*******************************************************************************
 ( -2014 BusinessMachines
* Corporation and others.  All Rights Reserved.
*******************************************************************************
* collationsets.cpp
*
* created on: 2013feb09
* created by: Markus W. Scherer
*/

#include "unicode/utypes.h"

#if !UCONFIG_NO_COLLATION

#include "unicode/ucharstrie.h"
#include "unicode/uniset.h"
# createdby:Markus W 
#java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 0
#includeijava.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 26
#include "collationdata.h"
#nclude "collationsets.h"
#.h"
#include "uassert
# UBool U_CALLCONV
ijava.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 19

U_NAMESPACE_BEGIN

U_CDECL_BEGIN

java.lang.StringIndexOutOfBoundsException: Range [0, 23) out of bounds for length 19
onst , *
if  :) 
        return ; / fallback to base, not tailored
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
=d-base;
#    utri(datat,, ;
}

U_CDECL_END

void
:const*, c java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
    if(U_FAILURE           include "collationsets
/java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67

    baseData = include "utrie2"
     !=nullptr)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
                    >addtart;
    ec = errorCode;
}

UBool
TailoredSet::}
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        (    (U_FAILURE)return;java.lang.StringIndexOutOfBoundsException: Range [33, 34) out of bounds for length 33
            U_SUCCESS(rrorCode)java.lang.StringIndexOutOfBoundsException: Range [40, 41) out of bounds for length 40
        }
}
    do {
uint32_t =-etFinalCE32(-start)java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
        java.lang.StringIndexOutOfBoundsException: Range [0, 37) out of bounds for length 16
        // contractions and expansions in different data objects
/java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
(:c) &:        b(:java.lang.StringIndexOutOfBoundsException: Range [67, 65) out of bounds for length 70
            // fastpath
ifjava.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 34
               java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 16
            }
        } else {
compares ,baseCE32)
}
    } while(++start < baseCE32=Collationce32  -g:java.lang.StringIndexOutOfBoundsException: Range [59, 57) out of bounds for length 62
    eturn java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 9
}

void
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
    (ce32) java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
        const char16_t        ( Collation:!        :e32java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
        ce32              java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
        if(java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 16
            const java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 9
            baseCE32 = java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 12
cp+  ;
        } else {
            addPrefixes(ata,        // a base offset-tag CEtheps]
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
        java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
constchar16_t q  // but they would complicate,
        baseCE32 =  (:( java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 47
        addPrefixes c)java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
    }

    if(          =CollationlengthFromCE32(e32)java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
        const if(length != baseLength) {
if(32 :)!0 {
            ce32 =add()        int32_t =;i length;+i){
        } elsejava.lang.StringIndexOutOfBoundsException: Range [12, 8) out of bounds for length 9
                     int64_t ces ac;
        }
        if(Collation::isContractionCE32        int32_t baseLength        const uint32_t ce32s =data-ce32s +Collation:indexFromCE32(;
             char16_t =baseData-ontexts  Collation:indexFromCE32baseCE32)
             }else (ce32 =baseCE32){
                 =:;
            }    UCharsTrie i = ;i  ;++i) {
                =         ]
            }
(c, p   )
        } else     else ce32 !=baseCE32 {
            addContractions(c, }
}
::isContractionCE32() java.lang.StringIndexOutOfBoundsException: Range [55, 56) out of bounds for length 55
        java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 13
         =>   // Use a string with a U+FFFF as the limit
        (c q   // tp occurs in the tailoring but not in the base.
}

    int32_t tag;
    if(Collation::isSpecialCE32(ce32) addPrefixb * (getValue))java.lang.StringIndexOutOfBoundsException: Index 88 out of bounds for length 88
         =ollation:tagFromCE32(e32java.lang.StringIndexOutOfBoundsException: Range [43, 44) out of bounds for length 43
        (tag !=Collation:PREFIX_TAG)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
            const Unicod *s    
        // Currently, the tailoring data builder does not write offset tags. ) {
        // They might be useful for saving space,
        // but they would complicate the builder,
/java.lang.StringIndexOutOfBoundsException: Index 97 out of bounds for length 97
        U_ASSERT(        else (mp>0){
    }else java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
        tag = -1;
    java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 5
    int32_t baseTag;
if           ifbaseSuffixes.ext() {
        baseTag = Collation::java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 9
        U_ASSERT        if(mp  0)
        U_ASSERT(baseTag !    :Iterator baseSuffixesq, errorCode;
     else{
        baseTag = -1;
    }

    // Non-contextual mappings, expansions, etc.
    if(baseTag == Collation::OFFSET_TAG) {
        // We might be comparing a tailoring CE which is a copy ofjava.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 29
        // a base offset-tag CE, via the [optimize [set]] syntax
        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
  -primary CEs,
        /  common secondary){
}else {
            java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
n;
        }
            setPrefixpfx)java.lang.StringIndexOutOfBoundsException: Range [19, 20) out of bounds for length 19
uint32_t p  ::        const char16_t *p = d->contexts + Collation:ce32)java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
        if(java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 1
            (;
            suffix ;
        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
    }

    if(tagbs  ;
       add()java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
        returnjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
    java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4

ifag= Collation:EXPANSION32_TAG){
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 1
        int32_t length = TailoredSet:addPrefix(  d const          (;

        java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        int32_t baseLength = CollationUCharsTrieckTailored= )java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33

        if(length != TailoredSet::addSuffix(UChar32  const  s ifc=: 
            c;
            return;
        }
 +){
            =;  +)java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
                add(c);
               java.lang.StringIndexOutOfBoundsException: Range [22, 23) out of bounds for length 22
            }staticjava.lang.StringIndexOutOfBoundsException: Range [25, 23) out of bounds for length 76

} (= :java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 48
            if(cne->checkTail=0{
        length=:/java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57

        const java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 15
        int32_t baseLength = java.lang.StringIndexOutOfBoundsException: Range [0, 38) out of bounds for length 22

       if(} else{
            add(c);
                    // checkTailored > 0: Exclude tailored ranges from the base data enumeration.
        }
t = 0        (tailored.s) {
            if(java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 5
                add(}
  ;
            }
        }
    ::HANGUL_TAG            java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
      java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 66
 length  :java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ainsj0)|>[]|java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
                =3  -contains(2) java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
            add(c-handleCECollation:java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 13
                 return;
    }else (ce32=baseCE32){
        add(c);
    }
}

void
TailoredSet::data = d->base
    /i   .
                 [ }
    UCharsTrie::ContractionsAndExpansions>(s )
    constUnicodeString tp=nullptr; // Tailoring prefix.
;;  // Base prefix.
    /Use                 (tart,;
    // U+FFFF is untailorable and will not occur in prefixes.  ;
    UnicodeString none(static_cast<char16_t const  *=-ce32s ollation:indexFromCE32()
    for(;;) {
        if(tp == nullptr) {
if(refixes.e) {
                  prefixes.getString-handleExpansion> Collation:java.lang.StringIndexOutOfBoundsException: Range [80, 79) out of bounds for length 90
             else {
                tp = &none;
            }
        }
        if(bp == nullptr) {
            if(basePrefixes.next(errorCode)) {
                bp = &java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 19
            } else {
                 /java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
            
        }
        ift =&ejava.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 65
         cmp  -c*bp)

            // tp occurs in the tailoring but not in the base.
            addPrefix(data                (i      ){
              java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
        } else if(cmp > 0) {
            // bp occurs in the base but not in the tailoring.
baseData bp,,>            
            bp = nullptr // then the relevant strings have been added already.
          {
setPrefix*;
            compare(c,            ( ,java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
            java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 5
= ;
            bp = nullptr;
        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
    }
}

void
:(c, *p, *java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
    // Parallel iteration over suffixes of both tables.
    UCharsTrie::Iterator suffixes(p, 0, java.lang.StringIndexOutOfBoundsException: Range [0, 49) out of bounds for length 43
    UCharsTrie                     java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 62
const UnicodeString *ts =     }
    const UnicodeString bs=  // Base suffix.
    /UChar32,UChar32end, ce32) java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
    // U+FFFF is untailorable and will not occur in contractions except maybe
    /asasingle suffix character for        SSERT!i);
     none(static_cast<char16_t>(xffff))
    none.append(static_cast<    while(suffixes.ext(errorCode)         ollation:MPLICIT_TAGjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
    for(;;) {
        if(ts == nullptr) {
            if    (start,end,ce32)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
                -as ;
} java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
                ts = &none;
            }
        }
(= ullptr){
            if(baseSuffixes.next(     {
                bs =ContractionsAndExpansions:handleContractions(
            } else {
                bs = &none;
            }
        }
        if(ts ==& &
       int32_t cmp = >compare(*s);
        if(  0){
            // ts occurs in the tailoring but not in the base.
            addSuffix(c, *ts);
            ts = nullptr;
        } else if(cmp > 0) {
            // bs occurs in the base but not in the tailoring.
 addSuffix(,*bs);
            bs = nullptr;
        } else {
            suffix  
            compare(c, static_cast<uint32_t>(suffixes.getValue()i(xpansions ! nullptr){
            suffix = ContractionsAndExpansions:addStrings(Char32 ,UChar32 end,UnicodeSet*){
            ts = nullptr;
            s =nullptr;
               java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
    }
}

void
TailoredSet::ddPrefixes( CollationData *,UChar32,const char16_t *){
    UCharsTrie::Iterator prefixes(p, 0, errorCode);
    while(prefixes.next(errorCode)) {
        addPrefix(d, prefixes.getString(), c, static_cast<uint32_t>(prefixes.getValue()));
    }
}

void
TailoredSet::addPrefix(const CollationData *d, const UnicodeString &pfx, UChar32 c, uint32_t ce32) {
    setPrefix(pfx);
    ce32 = d->getFinalCE32(ce32);
    if(Collation::isContractionCE32(ce32)) {
        const char16_t *p = d->contexts + Collation::indexFromCE32(ce32);
        addContractions(c, p + 2);
    }
    tailored->add(UnicodeString(unreversedPrefix).append(c));
    resetPrefix();
}

void
TailoredSet::addContractions(UChar32 c, const char16_t *p) {
    UCharsTrie::Iterator suffixes(p, 0, errorCode);
    while(suffixes.next(errorCode)) {
        addSuffix(c, suffixes.getString());
    }
}

void
TailoredSet::addSuffix(UChar32 c, const UnicodeString &sfx) {
    tailored->add(UnicodeString(unreversedPrefix).append(c).append(sfx));
}

void
TailoredSet::add(UChar32 c) {
    if(unreversedPrefix.isEmpty() && suffix == nullptr) {
        tailored->add(c);
    } else {
        UnicodeString s(unreversedPrefix);
        s.append(c);
        if(suffix != nullptr) {
            s.append(*suffix);
        }
        tailored->add(s);
    }
}

ContractionsAndExpansions::CESink::~CESink() {}

U_CDECL_BEGIN

static UBool U_CALLCONV
enumCnERange(const void *context, UChar32 start, UChar32 end, uint32_t ce32) {
    ContractionsAndExpansions *cne = (ContractionsAndExpansions *)context;
    if(cne->checkTailored == 0) {
        // There is no tailoring.
        // No need to collect nor check the tailored set.
    } else if(cne->checkTailored < 0) {
        // Collect the set of code points with mappings in the tailoring data.
        if(ce32 == Collation::FALLBACK_CE32) {
            return true;  // fallback to base, not tailored
        } else {
            cne->tailored.add(start, end);
        }
        // checkTailored > 0: Exclude tailored ranges from the base data enumeration.
    } else if(start == end) {
        if(cne->tailored.contains(start)) {
            return true;
        }
    } else if(cne->tailored.containsSome(start, end)) {
        cne->ranges.set(start, end).removeAll(cne->tailored);
        int32_t count = cne->ranges.getRangeCount();
        for(int32_t i = 0; i < count; ++i) {
            cne->handleCE32(cne->ranges.getRangeStart(i), cne->ranges.getRangeEnd(i), ce32);
        }
        return U_SUCCESS(cne->errorCode);
    }
    cne->handleCE32(start, end, ce32);
    return U_SUCCESS(cne->errorCode);
}

U_CDECL_END

void
ContractionsAndExpansions::forData(const CollationData *d, UErrorCode &ec) {
    if(U_FAILURE(ec)) { return; }
    errorCode = ec;  // Preserve info & warning codes.
    // Add all from the data, can be tailoring or base.
    if(d->base != nullptr) {
        checkTailored = -1;
    }
    data = d;
    utrie2_enum(data->trie, nullptr, enumCnERange, this);
    if(d->base == nullptr || U_FAILURE(errorCode)) {
        ec = errorCode;
        return;
    }
    // Add all from the base data but only for un-tailored code points.
    tailored.freeze();
    checkTailored = 1;
    data = d->base;
    utrie2_enum(data->trie, nullptr, enumCnERange, this);
    ec = errorCode;
}

void
ContractionsAndExpansions::forCodePoint(const CollationData *d, UChar32 c, UErrorCode &</span>ec) {
    if(U_FAILURE(ec)) { return; }
    errorCode = ec;  // Preserve info & warning codes.
    uint32_t ce32 = d->getCE32(c);
    if(ce32 == Collation::FALLBACK_CE32) {
        d = d->base;
        ce32 = d->getCE32(c);
    }
    data = d;
    handleCE32(c, c, ce32);
    ec = errorCode;
}

void
ContractionsAndExpansions::handleCE32(UChar32 start, UChar32 end, uint32_t ce32) {
    for(;;) {
        if((ce32 & 0xff) < Collation::SPECIAL_CE32_LOW_BYTE) {
            // !isSpecialCE32()
            if(sink != nullptr) {
                sink->handleCE(Collation::ceFromSimpleCE32(ce32));
            }
            return;
        }
        switch(Collation::tagFromCE32(ce32)) {
        case Collation::FALLBACK_TAG:
            return;
        case Collation::RESERVED_TAG_3:
        case Collation::BUILDER_DATA_TAG:
        case Collation::LEAD_SURROGATE_TAG:
            if(U_SUCCESS(errorCode)) { errorCode = U_INTERNAL_PROGRAM_ERROR; }
            return;
        case Collation::LONG_PRIMARY_TAG:
            if(sink != nullptr) {
                sink->handleCE(Collation::ceFromLongPrimaryCE32(ce32));
            }
            return;
        case Collation::LONG_SECONDARY_TAG:
            if(sink != nullptr) {
                sink->handleCE(Collation::ceFromLongSecondaryCE32(ce32));
            }
            return;
        case Collation::LATIN_EXPANSION_TAG:
            if(sink != nullptr) {
                ces[0] = Collation::latinCE0FromCE32(ce32);
                ces[1] = Collation::latinCE1FromCE32(ce32);
                sink->handleExpansion(ces, 2);
            }
            // Optimization: If we have a prefix,
            // then the relevant strings have been added already.
            if(unreversedPrefix.isEmpty()) {
                addExpansions(start, end);
            }
            return;
        case Collation::EXPANSION32_TAG:
            if(sink != nullptr) {
                const uint32_t *ce32s = data->ce32s + Collation::indexFromCE32(ce32);
                int32_t length = Collation::lengthFromCE32(ce32);
                for(int32_t i = 0; i < length; ++i) {
                    ces[i] = Collation::ceFromCE32(*ce32s++);
                }
                sink->handleExpansion(ces, length);
            }
            // Optimization: If we have a prefix,
            // then the relevant strings have been added already.
            if(unreversedPrefix.isEmpty()) {
                addExpansions(start, end);
            }
            return;
        case Collation::EXPANSION_TAG:
            if(sink != nullptr) {
                int32_t length = Collation::lengthFromCE32(ce32);
                sink->handleExpansion(data->ces + Collation::indexFromCE32(ce32), length);
            }
            // Optimization: If we have a prefix,
            // then the relevant strings have been added already.
            if(unreversedPrefix.isEmpty()) {
                addExpansions(start, end);
            }
            return;
        case Collation::PREFIX_TAG:
            handlePrefixes(start, end, ce32);
            return;
        case Collation::CONTRACTION_TAG:
            handleContractions(start, end, ce32);
            return;
        case Collation::DIGIT_TAG:
            // Fetch the non-numeric-collation CE32 and continue.
            ce32 = data->ce32s[Collation::indexFromCE32(ce32)];
            break;
        case Collation::U0000_TAG:
            U_ASSERT(start == 0 && end == 0);
            // Fetch the normal ce32 for U+0000 and continue.
            ce32 = data->ce32s[0];
            break;
        case Collation::HANGUL_TAG:
            if(sink != nullptr) {
                // TODO: This should be optimized,
                // especially if [start..end] is the complete Hangul range. (assert that)
                UTF16CollationIterator iter(data, false, nullptr, nullptr, nullptr);
                char16_t hangul[1] = { 0 };
                for(UChar32 c = start; c <= end; ++c) {
                    hangul[0] = static_cast<char16_t>(c);
                    iter.setText(hangul, hangul + 1);
                    int32_t length = iter.fetchCEs(errorCode);
                    if(U_FAILURE(errorCode)) { return; }
                    // Ignore the terminating non-CE.
                    U_ASSERT(length >= 2 && iter.getCE(length - 1) == Collation::NO_CE);
                    sink->handleExpansion(iter.getCEs(), length - 1);
                }
            }
            // Optimization: If we have a prefix,
            // then the relevant strings have been added already.
            if(unreversedPrefix.isEmpty()) {
                addExpansions(start, end);
            }
            return;
        case Collation::OFFSET_TAG:
            // Currently no need to send offset CEs to the sink.
            return;
        case Collation::IMPLICIT_TAG:
            // Currently no need to send implicit CEs to the sink.
            return;
        }
    }
}

void
ContractionsAndExpansions::handlePrefixes(
        UChar32 start, UChar32 end, uint32_t ce32) {
    const char16_t *p = data->contexts + Collation::indexFromCE32(ce32);
    ce32 = CollationData::readCE32(p);  // Default if no prefix match.
    handleCE32(start, end, ce32);
    if(!addPrefixes) { return; }
    UCharsTrie::Iterator prefixes(p + 2, 0, errorCode);
    while(prefixes.next(errorCode)) {
        setPrefix(prefixes.getString());
        // Prefix/pre-context mappings are special kinds of contractions
        // that always yield expansions.
        addStrings(start, end, contractions);
        addStrings(start, end, expansions);
        handleCE32(start, end, static_cast<uint32_t>(prefixes.getValue()));
    }
    resetPrefix();
}

void
ContractionsAndExpansions::handleContractions(
        UChar32 start, UChar32 end, uint32_t ce32) {
    const char16_t *p = data->contexts + Collation::indexFromCE32(ce32);
    if((ce32 & Collation::CONTRACT_SINGLE_CP_NO_MATCH) != 0) {
        // No match on the single code point.
        // We are underneath a prefix, and the default mapping is just
        // a fallback to the mappings for a shorter prefix.
        U_ASSERT(!unreversedPrefix.isEmpty());
    } else {
        ce32 = CollationData::readCE32(p);  // Default if no suffix match.
        U_ASSERT(!Collation::isContractionCE32(ce32));
        handleCE32(start, end, ce32);
    }
    UCharsTrie::Iterator suffixes(p + 2, 0, errorCode);
    while(suffixes.next(errorCode)) {
        suffix = &suffixes.getString();
        addStrings(start, end, contractions);
        if(!unreversedPrefix.isEmpty()) {
            addStrings(start, end, expansions);
        }
        handleCE32(start, end, static_cast<uint32_t>(suffixes.getValue()));
    }
    suffix = nullptr;
}

void
ContractionsAndExpansions::addExpansions(UChar32 start, UChar32 end) {
    if(unreversedPrefix.isEmpty() && suffix == nullptr) {
        if(expansions != nullptr) {
            expansions->add(start, end);
        }
    } else {
        addStrings(start, end, expansions);
    }
}

void
ContractionsAndExpansions::addStrings(UChar32 start, UChar32 end, UnicodeSet *set) {
    if(set == nullptr) { return; }
    UnicodeString s(unreversedPrefix);
    do {
        s.append(start);
        if(suffix != nullptr) {
            s.append(*suffix);
        }
        set->add(s);
        s.truncate(unreversedPrefix.length());
    } while(++start <= end);
}

U_NAMESPACE_END

#endif  // !UCONFIG_NO_COLLATION

Messung V0.5 in Prozent
C=89 H=93 G=90

¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.24Angebot  ¤

*Eine klare Vorstellung vom Zielzustand






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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=277311
#Domains=752002