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

UnicodeSet & UnicodeSet::complementAll ( const UnicodeSet c  )  [virtual]

Complements in this set all elements contained in the specified set. Any character in the other set will be removed if it is in this set, or will be added if it is not in this set. A frozen set will not be modified.

Parameters:
c set that defines which elements will be xor'ed from this set. ICU 2.4
Complements in this set all elements contained in the specified set. Any character in the other set will be removed if it is in this set, or will be added if it is not in this set.

Parameters:
c set that defines which elements will be xor'ed from this set.

Definition at line 1365 of file uniset.cpp.

References _add(), UVector::elementAt(), isBogus(), isFrozen(), len, list, UVector::removeElement(), UVector::size(), and strings.

                                                         {
    if (isFrozen() || isBogus()) {
        return *this;
    }
    exclusiveOr(c.list, c.len, 0);

    for (int32_t i=0; i<c.strings->size(); ++i) {
        void* e = c.strings->elementAt(i);
        if (!strings->removeElement(e)) {
            _add(*(const UnicodeString*)e);
        }
    }
    return *this;
}


Generated by  Doxygen 1.6.0   Back to index