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

UnicodeSet & UnicodeSet::add ( UChar32  start,
UChar32  end 
) [virtual]

Adds the specified range to this set if it is not already present. If this set already contains the specified range, the call leaves this set unchanged. If end > start then an empty range is added, leaving the set unchanged. This is equivalent to a boolean logic OR, or a set UNION. A frozen set will not be modified.

Parameters:
start first character, inclusive, of range to be added to this set.
end last character, inclusive, of range to be added to this set. ICU 2.0
Adds the specified range to this set if it is not already present. If this set already contains the specified range, the call leaves this set unchanged. If end > start then an empty range is added, leaving the set unchanged.

Parameters:
start first character, inclusive, of range to be added to this set.
end last character, inclusive, of range to be added to this set.

Definition at line 837 of file uniset.cpp.

Referenced by StringMatcher::addMatchSetTo(), StringReplacer::addReplacementSetTo(), TransliterationRule::addSourceSetTo(), UnicodeSetTest::bitsToSet(), closeOver(), UnicodeSetTest::TestCloseOver(), UnicodeSetTest::Testj2268(), UnicodeSetTest::TestToPattern(), ThaiBreakEngine::ThaiBreakEngine(), ucol_getTailoredSet(), and uspoof_check().

                                                      {
    if (pinCodePoint(start) < pinCodePoint(end)) {
        UChar32 range[3] = { start, end+1, UNICODESET_HIGH };
        add(range, 2, 0);
    } else if (start == end) {
        add(start);
    }
    return *this;
}


Generated by  Doxygen 1.6.0   Back to index