ICU-6064 Make UnicodeSet::closeOver() public

X-SVN-Rev: 25560
This commit is contained in:
Andy Heninger 2009-03-12 17:08:12 +00:00
parent 259961959e
commit 2213bd3046
3 changed files with 35 additions and 1 deletions

View file

@ -1293,7 +1293,7 @@ public:
* Currently only the USET_CASE bit is supported. Any undefined bits
* are ignored.
* @return a reference to this set.
* @internal
* @draft ICU 4.2
*/
UnicodeSet& closeOver(int32_t attribute);

View file

@ -687,6 +687,35 @@ uset_complementAll(USet* set, const USet* complement);
U_STABLE void U_EXPORT2
uset_clear(USet* set);
/**
* Close this set over the given attribute. For the attribute
* USET_CASE, the result is to modify this set so that:
*
* 1. For each character or string 'a' in this set, all strings or
* characters 'b' such that foldCase(a) == foldCase(b) are added
* to this set.
*
* 2. For each string 'e' in the resulting set, if e !=
* foldCase(e), 'e' will be removed.
*
* Example: [aq\\u00DF{Bc}{bC}{Fi}] => [aAqQ\\u00DF\\uFB01{ss}{bc}{fi}]
*
* (Here foldCase(x) refers to the operation u_strFoldCase, and a
* == b denotes that the contents are the same, not pointer
* comparison.)
*
* A frozen set will not be modified.
*
* @param set the set
*
* @param attribute bitmask for attributes to close over.
* Currently only the USET_CASE bit is supported. Any undefined bits
* are ignored.
* @draft ICU 4.2
*/
U_DRAFT void U_EXPORT2
uset_closeOver(USet* set, int32_t attributes);
/**
* Remove all strings from this set.
*

View file

@ -149,6 +149,11 @@ uset_clear(USet* set) {
((UnicodeSet*) set)->UnicodeSet::clear();
}
U_CAPI void U_EXPORT2
uset_closeOver(USet* set, int32_t attributes) {
((UnicodeSet*) set)->UnicodeSet::closeOver(attributes);
}
U_CAPI void U_EXPORT2
uset_removeAllStrings(USet* set) {
((UnicodeSet*) set)->UnicodeSet::removeAllStrings();