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

UnicodeSet::UnicodeSet ( const UnicodeString pattern,
uint32_t  options,
const SymbolTable symbols,
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
options bitmask for options to apply to the pattern. Valid options are USET_IGNORE_SPACE and USET_CASE_INSENSITIVE.
symbols a symbol table mapping variable names to values and stand-in characters to UnicodeSets; may be NULL
status returns U_ILLEGAL_ARGUMENT_ERROR if the pattern contains a syntax error.

For internal use only.

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
options bitmask for options to apply to the pattern. Valid options are USET_IGNORE_SPACE and USET_CASE_INSENSITIVE.

Definition at line 349 of file uniset_props.cpp.

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

                                           :
    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, options, symbols, status);
        }
    }
    _dbgct(this);
}


Generated by  Doxygen 1.6.0   Back to index