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

UnicodeSet & UnicodeSet::remove ( const UnicodeString s  ) 

Removes the specified string from this set if it is present. The set will not contain the specified character once the call returns. A frozen set will not be modified.

Parameters:
s the source string
Returns:
this object, for chaining ICU 2.4
Removes the specified string from this set if it is present. The set will not contain the specified character once the call returns.
Parameters:
the source string
Returns:
the modified set, for chaining

Definition at line 1201 of file uniset.cpp.

References getSingleCP(), isBogus(), isFrozen(), UnicodeString::length(), releasePattern(), and UVector::removeElement().

                                                     {
    if (s.length() == 0 || isFrozen() || isBogus()) return *this;
    int32_t cp = getSingleCP(s);
    if (cp < 0) {
        strings->removeElement((void*) &s);
        releasePattern();
    } else {
        remove((UChar32)cp, (UChar32)cp);
    }
    return *this;
}


Generated by  Doxygen 1.6.0   Back to index