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

UnicodeSet & UnicodeSet::addAll ( const UnicodeString s  ) 

Adds each of the characters in this string to the set. Thus "ch" => {"c", "h"} If this set already any particular character, it has no effect on that character. A frozen set will not be modified.

Parameters:
s the source string
Returns:
this object, for chaining ICU 2.4
Adds each of the characters in this string to the set. Thus "ch" => {"c", "h"} If this set already any particular character, it has no effect on that character.
Parameters:
the source string
Returns:
the modified set, for chaining

Definition at line 1060 of file uniset.cpp.

References UnicodeString::char32At(), UnicodeString::length(), and UTF_CHAR_LENGTH.

Referenced by addMatchSetTo(), FunctionReplacer::addReplacementSetTo(), applyPattern(), complementAll(), CompoundTransliterator::getTargetSet(), CompoundTransliterator::handleGetSourceSet(), removeAll(), retainAll(), SpoofImpl::setAllowedLocales(), and UnicodeSetTest::TestCloseOver().

                                                     {
    UChar32 cp;
    for (int32_t i = 0; i < s.length(); i += UTF_CHAR_LENGTH(cp)) {
        cp = s.char32At(i);
        add(cp);
    }
    return *this;
}


Generated by  Doxygen 1.6.0   Back to index