Logo Search packages:      
Sourcecode: icu version File versions  Download package

UnicodeSet::UnicodeSet ( UChar32  start,
UChar32  end 
)

Constructs a set containing the given range. If end > start then an empty set is created.

Parameters:
start first character, inclusive, of range
end last character, inclusive, of range ICU 2.4
Constructs a set containing the given range. If end > start then an empty set is created.

Parameters:
start first character, inclusive, of range
end last character, inclusive, of range

Definition at line 170 of file uniset.cpp.

References allocateStrings(), complement(), NULL, setToBogus(), U_FAILURE, and U_ZERO_ERROR.

                                                 :
    len(1), capacity(1 + START_EXTRA), list(0), bmpSet(0), buffer(0),
    bufferCapacity(0), patLen(0), pat(NULL), strings(NULL), stringSpan(NULL),
    fFlags(0)
{
    UErrorCode status = U_ZERO_ERROR;
    allocateStrings(status);
    if (U_FAILURE(status)) {
        return;
    }
    list = (UChar32*) uprv_malloc(sizeof(UChar32) * capacity);
    if(list!=NULL){
        list[0] = UNICODESET_HIGH;
        complement(start, end);
    } else { // If memory allocation failed, set to bogus state.
        setToBogus();
        return;
    }
    _dbgct(this);
}


Generated by  Doxygen 1.6.0   Back to index