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

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

Retains only the elements in this set that are contained in the specified set. In other words, removes from this set all of its elements that are not contained in the specified set. This operation effectively modifies this set so that its value is the intersection of the two sets. A frozen set will not be modified.

Parameters:
c set that defines which elements this set will retain. ICU 2.0
Retains only the elements in this set that are contained in the specified set. In other words, removes from this set all of its elements that are not contained in the specified set. This operation effectively modifies this set so that its value is the intersection of the two sets.

Parameters:
c set that defines which elements this set will retain.

Definition at line 1330 of file uniset.cpp.

References isBogus(), isFrozen(), len, list, retain(), UVector::retainAll(), and strings.

                                                     {
    if (isFrozen() || isBogus()) {
        return *this;
    }
    retain(c.list, c.len, 0);
    strings->retainAll(*c.strings);
    return *this;
}


Generated by  Doxygen 1.6.0   Back to index