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

UnicodeSet::UnicodeSet ( const UnicodeString pattern,
UErrorCode status 
)

Constructs a set from the given pattern. See the class description for the syntax of the pattern language.

Parameters:
pattern a string specifying what characters are in the set
status returns U_ILLEGAL_ARGUMENT_ERROR if the pattern contains a syntax error. ICU 2.0
Constructs a set from the given pattern, optionally ignoring white space. See the class description for the syntax of the pattern language.
Parameters:
pattern a string specifying what characters are in the set

Definition at line 322 of file uniset_props.cpp.

References allocateStrings(), applyPattern(), NULL, U_MEMORY_ALLOCATION_ERROR, U_SUCCESS, and USET_IGNORE_SPACE.

                                           :
    len(0), capacity(START_EXTRA), list(0), bmpSet(0), buffer(0),
    bufferCapacity(0), patLen(0), pat(NULL), strings(NULL), stringSpan(NULL),
    fFlags(0)
{   
    if(U_SUCCESS(status)){
        list = (UChar32*) uprv_malloc(sizeof(UChar32) * capacity);
        /* test for NULL */
        if(list == NULL) {
            status = U_MEMORY_ALLOCATION_ERROR;  
        }else{
            allocateStrings(status);
            applyPattern(pattern, USET_IGNORE_SPACE, NULL, status);
        }
    }
    _dbgct(this);
}


Generated by  Doxygen 1.6.0   Back to index