Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

UnicodeSet Class Reference

A mutable set of Unicode characters and multicharacter strings. More...

#include <uniset.h>

Inheritance diagram for UnicodeSet::

UnicodeFilter UnicodeFunctor UnicodeMatcher UObject UMemory List of all members.

Public Methods

 UnicodeSet ()
 Constructs an empty set. More...

 UnicodeSet (UChar32 start, UChar32 end)
 Constructs a set containing the given range. More...

 UnicodeSet (const UnicodeString &pattern, UErrorCode &status)
 Constructs a set from the given pattern. More...

 UnicodeSet (const UnicodeString &pattern, uint32_t options, const SymbolTable *symbols, UErrorCode &status)
 Constructs a set from the given pattern. More...

 UnicodeSet (const UnicodeString &pattern, ParsePosition &pos, uint32_t options, const SymbolTable *symbols, UErrorCode &status)
 Constructs a set from the given pattern. More...

 UnicodeSet (const UnicodeSet &o)
 Constructs a set that is identical to the given UnicodeSet. More...

virtual ~UnicodeSet ()
 Destructs the set. More...

UnicodeSet & operator= (const UnicodeSet &o)
 Assigns this object to be a copy of another. More...

virtual UBool operator== (const UnicodeSet &o) const
 Compares the specified object with this set for equality. More...

UBool operator!= (const UnicodeSet &o) const
 Compares the specified object with this set for equality. More...

virtual UnicodeFunctorclone () const
 Returns a copy of this object. More...

virtual int32_t hashCode (void) const
 Returns the hash code value for this set. More...

UnicodeSet & set (UChar32 start, UChar32 end)
 Make this object represent the range start - end. More...

virtual UnicodeSet & applyPattern (const UnicodeString &pattern, UErrorCode &status)
 Modifies this set to represent the set specified by the given pattern, optionally ignoring white space. More...

UnicodeSet & applyPattern (const UnicodeString &pattern, uint32_t options, const SymbolTable *symbols, UErrorCode &status)
 Modifies this set to represent the set specified by the given pattern, optionally ignoring white space. More...

UnicodeSet & applyPattern (const UnicodeString &pattern, ParsePosition &pos, uint32_t options, const SymbolTable *symbols, UErrorCode &status)
 Parses the given pattern, starting at the given position. More...

virtual UnicodeStringtoPattern (UnicodeString &result, UBool escapeUnprintable=FALSE) const
 Returns a string representation of this set. More...

UnicodeSet & applyIntPropertyValue (UProperty prop, int32_t value, UErrorCode &ec)
 Modifies this set to contain those code points which have the given value for the given binary or enumerated property, as returned by u_getIntPropertyValue. More...

UnicodeSet & applyPropertyAlias (const UnicodeString &prop, const UnicodeString &value, UErrorCode &ec)
 Modifies this set to contain those code points which have the given value for the given property. More...

virtual int32_t size (void) const
 Returns the number of elements in this set (its cardinality), n, where 0 <= n <= 65536. More...

virtual UBool isEmpty (void) const
 Returns true if this set contains no elements. More...

virtual UBool contains (UChar32 c) const
 Returns true if this set contains the given character. More...

virtual UBool contains (UChar32 start, UChar32 end) const
 Returns true if this set contains every character of the given range. More...

UBool contains (const UnicodeString &s) const
 Returns true if this set contains the given multicharacter string. More...

virtual UBool containsAll (const UnicodeSet &c) const
 Returns true if this set contains all the characters and strings of the given set. More...

UBool containsAll (const UnicodeString &s) const
 Returns true if this set contains all the characters of the given string. More...

UBool containsNone (UChar32 start, UChar32 end) const
 Returns true if this set contains none of the characters of the given range. More...

UBool containsNone (const UnicodeSet &c) const
 Returns true if this set contains none of the characters and strings of the given set. More...

UBool containsNone (const UnicodeString &s) const
 Returns true if this set contains none of the characters of the given string. More...

UBool containsSome (UChar32 start, UChar32 end) const
 Returns true if this set contains one or more of the characters in the given range. More...

UBool containsSome (const UnicodeSet &s) const
 Returns true if this set contains one or more of the characters and strings of the given set. More...

UBool containsSome (const UnicodeString &s) const
 Returns true if this set contains one or more of the characters of the given string. More...

UMatchDegree matches (const Replaceable &text, int32_t &offset, int32_t limit, UBool incremental)
 Implement UnicodeMatcher::matches(). More...

void addMatchSetTo (UnicodeSet &toUnionTo) const
 Implementation of UnicodeMatcher API. More...

int32_t indexOf (UChar32 c) const
 Returns the index of the given character within this set, where the set is ordered by ascending code point. More...

UChar32 charAt (int32_t index) const
 Returns the character at the given index within this set, where the set is ordered by ascending code point. More...

virtual UnicodeSet & add (UChar32 start, UChar32 end)
 Adds the specified range to this set if it is not already present. More...

UnicodeSet & add (UChar32 c)
 Adds the specified character to this set if it is not already present. More...

UnicodeSet & add (const UnicodeString &s)
 Adds the specified multicharacter to this set if it is not already present. More...

UnicodeSet & addAll (const UnicodeString &s)
 Adds each of the characters in this string to the set. More...

UnicodeSet & retainAll (const UnicodeString &s)
 Retains EACH of the characters in this string. More...

UnicodeSet & complementAll (const UnicodeString &s)
 Complement EACH of the characters in this string. More...

UnicodeSet & removeAll (const UnicodeString &s)
 Remove EACH of the characters in this string. More...

virtual UnicodeSet & retain (UChar32 start, UChar32 end)
 Retain only the elements in this set that are contained in the specified range. More...

UnicodeSet & retain (UChar32 c)
 Retain the specified character from this set if it is present. More...

virtual UnicodeSet & remove (UChar32 start, UChar32 end)
 Removes the specified range from this set if it is present. More...

UnicodeSet & remove (UChar32 c)
 Removes the specified character from this set if it is present. More...

UnicodeSet & remove (const UnicodeString &s)
 Removes the specified string from this set if it is present. More...

virtual UnicodeSet & complement (void)
 Inverts this set. More...

virtual UnicodeSet & complement (UChar32 start, UChar32 end)
 Complements the specified range in this set. More...

UnicodeSet & complement (UChar32 c)
 Complements the specified character in this set. More...

UnicodeSet & complement (const UnicodeString &s)
 Complement the specified string in this set. More...

virtual UnicodeSet & addAll (const UnicodeSet &c)
 Adds all of the elements in the specified set to this set if they're not already present. More...

virtual UnicodeSet & retainAll (const UnicodeSet &c)
 Retains only the elements in this set that are contained in the specified set. More...

virtual UnicodeSet & removeAll (const UnicodeSet &c)
 Removes from this set all of its elements that are contained in the specified set. More...

virtual UnicodeSet & complementAll (const UnicodeSet &c)
 Complements in this set all elements contained in the specified set. More...

virtual UnicodeSet & clear (void)
 Removes all of the elements from this set. More...

UnicodeSet & closeOver (int32_t attribute)
 Close this set over the given attribute. More...

virtual int32_t getRangeCount (void) const
 Iteration method that returns the number of ranges contained in this set. More...

virtual UChar32 getRangeStart (int32_t index) const
 Iteration method that returns the first character in the specified range of this set. More...

virtual UChar32 getRangeEnd (int32_t index) const
 Iteration method that returns the last character in the specified range of this set. More...

int32_t serialize (uint16_t *dest, int32_t destCapacity, UErrorCode &ec) const
 Serializes this set into an array of 16-bit integers. More...

virtual UnicodeSet & compact ()
 Reallocate this objects internal structures to take up the least possible space, without changing this object's value. More...

virtual UClassID getDynamicClassID (void) const
 Implement UnicodeFunctor API. More...


Static Public Methods

UBool resemblesPattern (const UnicodeString &pattern, int32_t pos)
 Return true if the given position, in the given pattern, appears to be the start of a UnicodeSet pattern. More...

UnicodeSet * createFrom (const UnicodeString &s)
 Makes a set from a multicharacter string. More...

UnicodeSet * createFromAll (const UnicodeString &s)
 Makes a set from each of the characters in the string. More...

UClassID getStaticClassID (void)
 Return the class ID for this class. More...


Static Public Attributes

const UChar32 MIN_VALUE
 Minimum value that can be stored in a UnicodeSet. More...

const UChar32 MAX_VALUE
 Maximum value that can be stored in a UnicodeSet. More...


Private Types

typedef UBool(* Filter )(UChar32 codePoint, void *context)
 A filter that returns TRUE if the given code point should be included in the UnicodeSet being constructed. More...


Private Methods

int32_t findCodePoint (UChar32 c) const
 Returns the smallest value i such that c < list[i]. More...

void _add (const UnicodeString &s)
int32_t getStringCount () const
const UnicodeStringgetString (int32_t index) const
virtual UBool matchesIndexValue (uint8_t v) const
 Returns true if this set contains any character whose low byte is the given value. More...

void applyPattern (RuleCharacterIterator &chars, const SymbolTable *symbols, UnicodeString &rebuiltPat, uint32_t options, UErrorCode &ec)
void ensureCapacity (int32_t newLen)
void ensureBufferCapacity (int32_t newLen)
void swapBuffers (void)
UBool allocateStrings ()
UnicodeString_toPattern (UnicodeString &result, UBool escapeUnprintable) const
UnicodeString_generatePattern (UnicodeString &result, UBool escapeUnprintable) const
void exclusiveOr (const UChar32 *other, int32_t otherLen, int8_t polarity)
void add (const UChar32 *other, int32_t otherLen, int8_t polarity)
void retain (const UChar32 *other, int32_t otherLen, int8_t polarity)
UnicodeSet & applyPropertyPattern (const UnicodeString &pattern, ParsePosition &ppos, UErrorCode &ec)
 Parse the given property pattern at the given parse position and set this UnicodeSet to the result. More...

void applyPropertyPattern (RuleCharacterIterator &chars, UnicodeString &rebuiltPat, UErrorCode &ec)
void applyFilter (Filter filter, void *context, UErrorCode &status)
 Given a filter, set this UnicodeSet to the code points contained by that filter. More...

void caseCloseOne (const UnicodeString &folded)
void caseCloseOne (const CaseEquivClass &c)
void caseCloseOne (UChar folded)

Static Private Methods

int32_t matchRest (const Replaceable &text, int32_t start, int32_t limit, const UnicodeString &s)
 Returns the longest match for s in text at the given position. More...

int32_t getSingleCP (const UnicodeString &s)
void _appendToPat (UnicodeString &buf, const UnicodeString &s, UBool escapeUnprintable)
void _appendToPat (UnicodeString &buf, UChar32 c, UBool escapeUnprintable)
UBool resemblesPropertyPattern (const UnicodeString &pattern, int32_t pos)
 Return true if the given position, in the given pattern, appears to be the start of a property set pattern [:foo:], \p{foo}, or \P{foo}, or \N{name}. More...

UBool resemblesPropertyPattern (RuleCharacterIterator &chars, int32_t iterOpts)
const UnicodeSet * getInclusions (UErrorCode &errorCode)
 Return a cached copy of the inclusions list that uprv_getInclusions() produces. More...

const CaseEquivClass * getCaseMapOf (const UnicodeString &folded)
const CaseEquivClass * getCaseMapOf (UChar folded)

Private Attributes

int32_t len
int32_t capacity
int32_t bufferCapacity
UChar32list
UChar32buffer
UVector * strings
UnicodeString pat
 The pattern representation of this set. More...


Friends

class USetAccess
class UnicodeSetIterator

Detailed Description

A mutable set of Unicode characters and multicharacter strings.

Objects of this class represent character classes used in regular expressions. A character specifies a subset of Unicode code points. Legal code points are U+0000 to U+10FFFF, inclusive.

The UnicodeSet class is not designed to be subclassed.

UnicodeSet supports two APIs. The first is the operand API that allows the caller to modify the value of a UnicodeSet object. It conforms to Java 2's java.util.Set interface, although UnicodeSet does not actually implement that interface. All methods of Set are supported, with the modification that they take a character range or single character instead of an Object, and they take a UnicodeSet instead of a Collection. The operand API may be thought of in terms of boolean logic: a boolean OR is implemented by add, a boolean AND is implemented by retain, a boolean XOR is implemented by complement taking an argument, and a boolean NOT is implemented by complement with no argument. In terms of traditional set theory function names, add is a union, retain is an intersection, remove is an asymmetric difference, and complement with no argument is a set complement with respect to the superset range MIN_VALUE-MAX_VALUE

The second API is the applyPattern()/toPattern() API from the java.text.Format-derived classes. Unlike the methods that add characters, add categories, and control the logic of the set, the method applyPattern() sets all attributes of a UnicodeSet at once, based on a string pattern.

Pattern syntax

Patterns are accepted by the constructors and the applyPattern() methods and returned by the toPattern() method. These patterns follow a syntax similar to that employed by version 8 regular expression character classes. Here are some simple examples:

[] No characters
[a] The character 'a'
[ae] The characters 'a' and 'e'
[a-e] The characters 'a' through 'e' inclusive, in Unicode code point order
[\u4E01] The character U+4E01
[a{ab}{ac}] The character 'a' and the multicharacter strings "ab" and "ac"
[\p{Lu}] All characters in the general category Uppercase Letter

Any character may be preceded by a backslash in order to remove any special meaning. White space characters, as defined by UCharacter.isWhitespace(), are ignored, unless they are escaped.

Property patterns specify a set of characters having a certain property as defined by the Unicode standard. Both the POSIX-like "[:Lu:]" and the Perl-like syntax "\p{Lu}" are recognized. For a complete list of supported property patterns, see the User's Guide for UnicodeSet at http://oss.software.ibm.com/icu/userguide/unicodeSet.html. Actual determination of property data is defined by the underlying Unicode database as implemented by UCharacter.

Patterns specify individual characters, ranges of characters, and Unicode property sets. When elements are concatenated, they specify their union. To complement a set, place a '^' immediately after the opening '['. Property patterns are inverted by modifying their delimiters; "[:^foo]" and "\P{foo}". In any other location, '^' has no special meaning.

Ranges are indicated by placing two a '-' between two characters, as in "a-z". This specifies the range of all characters from the left to the right, in Unicode order. If the left character is greater than or equal to the right character it is a syntax error. If a '-' occurs as the first character after the opening '[' or '[^', or if it occurs as the last character before the closing ']', then it is taken as a literal. Thus "[a\u005C-b]", "[-ab]", and "[ab-]" all indicate the same set of three characters, 'a', 'b', and '-'.

Sets may be intersected using the '&' operator or the asymmetric set difference may be taken using the '-' operator, for example, "[[:L:]&[\u005Cu0000-\u005Cu0FFF]]" indicates the set of all Unicode letters with values less than 4096. Operators ('&' and '|') have equal precedence and bind left-to-right. Thus "[[:L:]-[a-z]-[\u005Cu0100-\u005Cu01FF]]" is equivalent to "[[[:L:]-[a-z]]-[\u005Cu0100-\u005Cu01FF]]". This only really matters for difference; intersection is commutative.

[a]The set containing 'a'
[a-z]The set containing 'a' through 'z' and all letters in between, in Unicode order
[^a-z]The set containing all characters but 'a' through 'z', that is, U+0000 through 'a'-1 and 'z'+1 through U+10FFFF
[[pat1][pat2]] The union of sets specified by pat1 and pat2
[[pat1]&[pat2]] The intersection of sets specified by pat1 and pat2
[[pat1]-[pat2]] The asymmetric difference of sets specified by pat1 and pat2
[:Lu:] or \p{Lu} The set of characters having the specified Unicode property; in this case, Unicode uppercase letters
[:^Lu:] or \P{Lu} The set of characters not having the given Unicode property

Warning: you cannot add an empty string ("") to a UnicodeSet.

Formal syntax

pattern :=  ('[' '^'? item* ']') | property
item :=  char | (char '-' char) | pattern-expr
pattern-expr :=  pattern | pattern-expr pattern | pattern-expr op pattern
op :=  '&' | '-'
special :=  '[' | ']' | '-'
char :=  any character that is not special
| ('\'
any character)
| ('\u' hex hex hex hex)
hex :=  any character for which Character.digit(c, 16) returns a non-negative result
property :=  a Unicode property set pattern

Legend:
a := b   a may be replaced by b
a? zero or one instance of a
a* one or more instances of a
a | b either a or b
'a' the literal string between the quotes

Author:
Alan Liu
Stable:
ICU 2.0

Definition at line 258 of file uniset.h.


Member Typedef Documentation

typedef UBool(* UnicodeSet::Filter)(UChar32 codePoint, void* context) [private]
 

A filter that returns TRUE if the given code point should be included in the UnicodeSet being constructed.


Constructor & Destructor Documentation

UnicodeSet::UnicodeSet  
 

Constructs an empty set.

Stable:
ICU 2.0

UnicodeSet::UnicodeSet UChar32    start,
UChar32    end
 

Constructs a set containing the given range.

If end > start then an empty set is created.

Parameters:
start  first character, inclusive, of range
end  last character, inclusive, of range
Draft:
This API has been introduced in ICU 2.4. It is still in draft state and may be modified in a future release.

UnicodeSet::UnicodeSet const UnicodeString   pattern,
UErrorCode   status
 

Constructs a set from the given pattern.

See the class description for the syntax of the pattern language.

Parameters:
pattern  a string specifying what characters are in the set
status  returns U_ILLEGAL_ARGUMENT_ERROR if the pattern contains a syntax error.
Stable:
ICU 2.0

UnicodeSet::UnicodeSet const UnicodeString   pattern,
uint32_t    options,
const SymbolTable   symbols,
UErrorCode   status
 

Constructs a set from the given pattern.

See the class description for the syntax of the pattern language.

Parameters:
pattern  a string specifying what characters are in the set
options  bitmask for options to apply to the pattern. Valid options are USET_IGNORE_SPACE and USET_CASE_INSENSITIVE.
status  returns U_ILLEGAL_ARGUMENT_ERROR if the pattern contains a syntax error.
Internal:
For internal use only.

UnicodeSet::UnicodeSet const UnicodeString   pattern,
ParsePosition   pos,
uint32_t    options,
const SymbolTable   symbols,
UErrorCode   status
 

Constructs a set from the given pattern.

See the class description for the syntax of the pattern language.

Parameters:
pattern  a string specifying what characters are in the set
pos  on input, the position in pattern at which to start parsing. On output, the position after the last character parsed.
options  bitmask for options to apply to the pattern. Valid options are USET_IGNORE_SPACE and USET_CASE_INSENSITIVE.
symbols  a symbol table mapping variable names to values and stand-in characters to UnicodeSets; may be NULL
status  input-output error code
Draft:
This API has been introduced in ICU 2.8. It is still in draft state and may be modified in a future release.

UnicodeSet::UnicodeSet const UnicodeSet &    o
 

Constructs a set that is identical to the given UnicodeSet.

Stable:
ICU 2.0

virtual UnicodeSet::~UnicodeSet   [virtual]
 

Destructs the set.

Stable:
ICU 2.0


Member Function Documentation

void UnicodeSet::_add const UnicodeString   s [private]
 

void UnicodeSet::_appendToPat UnicodeString   buf,
UChar32    c,
UBool    escapeUnprintable
[static, private]
 

void UnicodeSet::_appendToPat UnicodeString   buf,
const UnicodeString   s,
UBool    escapeUnprintable
[static, private]
 

UnicodeString& UnicodeSet::_generatePattern UnicodeString   result,
UBool    escapeUnprintable
const [private]
 

UnicodeString& UnicodeSet::_toPattern UnicodeString   result,
UBool    escapeUnprintable
const [private]
 

void UnicodeSet::add const UChar32   other,
int32_t    otherLen,
int8_t    polarity
[private]
 

UnicodeSet& UnicodeSet::add const UnicodeString   s
 

Adds the specified multicharacter to this set if it is not already present.

If this set already contains the multicharacter, the call leaves this set unchanged. Thus "ch" => {"ch"}
Warning: you cannot add an empty string ("") to a UnicodeSet.

Parameters:
s  the source string
Returns:
this object, for chaining
Draft:
This API has been introduced in ICU 2.4. It is still in draft state and may be modified in a future release.

UnicodeSet& UnicodeSet::add UChar32    c
 

Adds the specified character to this set if it is not already present.

If this set already contains the specified character, the call leaves this set unchanged.

Stable:
ICU 2.0

virtual 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.

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.
Stable:
ICU 2.0

virtual UnicodeSet& UnicodeSet::addAll const UnicodeSet &    c [virtual]
 

Adds all of the elements in the specified set to this set if they're not already present.

This operation effectively modifies this set so that its value is the union of the two sets. The behavior of this operation is unspecified if the specified collection is modified while the operation is in progress.

Parameters:
c  set whose elements are to be added to this set.
See also:
add(char, char)
Stable:
ICU 2.0

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.

Parameters:
s  the source string
Returns:
this object, for chaining
Draft:
This API has been introduced in ICU 2.4. It is still in draft state and may be modified in a future release.

void UnicodeSet::addMatchSetTo UnicodeSet &    toUnionTo const [virtual]
 

Implementation of UnicodeMatcher API.

Union the set of all characters that may be matched by this object into the given set.

Parameters:
toUnionTo  the set into which to union the source characters
Draft:
This API has been introduced in ICU 2.4. It is still in draft state and may be modified in a future release.

Reimplemented from UnicodeMatcher.

UBool UnicodeSet::allocateStrings   [private]
 

void UnicodeSet::applyFilter Filter    filter,
void *    context,
UErrorCode   status
[private]
 

Given a filter, set this UnicodeSet to the code points contained by that filter.

The filter MUST be property-conformant. That is, if it returns value v for one code point, then it must return v for all affiliated code points, as defined by the inclusions list. See uprv_getInclusions().

UnicodeSet& UnicodeSet::applyIntPropertyValue UProperty    prop,
int32_t    value,
UErrorCode   ec
 

Modifies this set to contain those code points which have the given value for the given binary or enumerated property, as returned by u_getIntPropertyValue.

Prior contents of this set are lost.

Parameters:
prop  a property in the range UCHAR_BIN_START..UCHAR_BIN_LIMIT-1 or UCHAR_INT_START..UCHAR_INT_LIMIT-1 or UCHAR_MASK_START..UCHAR_MASK_LIMIT-1.
value  a value in the range u_getIntPropertyMinValue(prop).. u_getIntPropertyMaxValue(prop), with one exception. If prop is UCHAR_GENERAL_CATEGORY_MASK, then value should not be a UCharCategory, but rather a mask value produced by U_GET_GC_MASK(). This allows grouped categories such as [:L:] to be represented.
ec  error code input/output parameter
Returns:
a reference to this set
Draft:
This API has been introduced in ICU 2.4. It is still in draft state and may be modified in a future release.

void UnicodeSet::applyPattern RuleCharacterIterator &    chars,
const SymbolTable   symbols,
UnicodeString   rebuiltPat,
uint32_t    options,
UErrorCode   ec
[private]
 

UnicodeSet& UnicodeSet::applyPattern const UnicodeString   pattern,
ParsePosition   pos,
uint32_t    options,
const SymbolTable   symbols,
UErrorCode   status
 

Parses the given pattern, starting at the given position.

The character at pattern.charAt(pos.getIndex()) must be '[', or the parse fails. Parsing continues until the corresponding closing ']'. If a syntax error is encountered between the opening and closing brace, the parse fails. Upon return from a successful parse, the ParsePosition is updated to point to the character following the closing ']', and a StringBuffer containing a pairs list for the parsed pattern is returned. This method calls itself recursively to parse embedded subpatterns. Empties the set passed before applying the pattern.

Parameters:
pattern  the string containing the pattern to be parsed. The portion of the string from pos.getIndex(), which must be a '[', to the corresponding closing ']', is parsed.
pos  upon entry, the position at which to being parsing. The character at pattern.charAt(pos.getIndex()) must be a '['. Upon return from a successful parse, pos.getIndex() is either the character after the closing ']' of the parsed pattern, or pattern.length() if the closing ']' is the last character of the pattern string.
options  bitmask for options to apply to the pattern. Valid options are USET_IGNORE_SPACE and USET_CASE_INSENSITIVE.
symbols  a symbol table mapping variable names to values and stand-ins to UnicodeSets; may be NULL
Returns:
a reference to this
Draft:
This API has been introduced in ICU 2.8. It is still in draft state and may be modified in a future release.

UnicodeSet& UnicodeSet::applyPattern const UnicodeString   pattern,
uint32_t    options,
const SymbolTable   symbols,
UErrorCode   status
 

Modifies this set to represent the set specified by the given pattern, optionally ignoring white space.

See the class description for the syntax of the pattern language.

Parameters:
pattern  a string specifying what characters are in the set
options  bitmask for options to apply to the pattern. Valid options are USET_IGNORE_SPACE and USET_CASE_INSENSITIVE.
symbols  a symbol table mapping variable names to values and stand-ins to UnicodeSets; may be NULL
status  returns U_ILLEGAL_ARGUMENT_ERROR if the pattern contains a syntax error. Empties the set passed before applying the pattern.
Returns:
a reference to this
Internal:
For internal use only.

virtual UnicodeSet& UnicodeSet::applyPattern const UnicodeString   pattern,
UErrorCode   status
[virtual]
 

Modifies this set to represent the set specified by the given pattern, optionally ignoring white space.

See the class description for the syntax of the pattern language.

Parameters:
pattern  a string specifying what characters are in the set
status  returns U_ILLEGAL_ARGUMENT_ERROR if the pattern contains a syntax error. Empties the set passed before applying the pattern.
Returns:
a reference to this
Stable:
ICU 2.0

UnicodeSet& UnicodeSet::applyPropertyAlias const UnicodeString   prop,
const UnicodeString   value,
UErrorCode   ec
 

Modifies this set to contain those code points which have the given value for the given property.

Prior contents of this set are lost.

Parameters:
prop  a property alias, either short or long. The name is matched loosely. See PropertyAliases.txt for names and a description of loose matching. If the value string is empty, then this string is interpreted as either a General_Category value alias, a Script value alias, a binary property alias, or a special ID. Special IDs are matched loosely and correspond to the following sets:
"ANY" = [\u0000-\U0010FFFF], "ASCII" = [\u0000-\u007F].
Parameters:
value  a value alias, either short or long. The name is matched loosely. See PropertyValueAliases.txt for names and a description of loose matching. In addition to aliases listed, numeric values and canonical combining classes may be expressed numerically, e.g., ("nv", "0.5") or ("ccc", "220"). The value string may also be empty.
ec  error code input/output parameter
Returns:
a reference to this set
Draft:
This API has been introduced in ICU 2.4. It is still in draft state and may be modified in a future release.

void UnicodeSet::applyPropertyPattern RuleCharacterIterator &    chars,
UnicodeString   rebuiltPat,
UErrorCode   ec
[private]
 

UnicodeSet& UnicodeSet::applyPropertyPattern const UnicodeString   pattern,
ParsePosition   ppos,
UErrorCode   ec
[private]
 

Parse the given property pattern at the given parse position and set this UnicodeSet to the result.

The original design document is out of date, but still useful. Ignore the property and value names: http://oss.software.ibm.com/cvs/icu/~checkout~/icuhtml/design/unicodeset_properties.html

Recognized syntax:

[:foo:] [:^foo:] - white space not allowed within "[:" or ":]" \p{foo} \P{foo} - white space not allowed within "\p" or "\P" \N{name} - white space not allowed within "\N"

Other than the above restrictions, white space is ignored. Case is ignored except in "\p" and "\P" and "\N". In 'name' leading and trailing space is deleted, and internal runs of whitespace are collapsed to a single space.

We support binary properties, enumerated properties, and the following non-enumerated properties:

Numeric_Value Name Unicode_1_Name

Parameters:
pattern  the pattern string
ppos  on entry, the position at which to begin parsing. This should be one of the locations marked '^':
[:blah:] \p{blah} \P{blah} \N{name} ^ % ^ % ^ % ^ %

On return, the position after the last character parsed, that is, the locations marked '%'. If the parse fails, ppos is returned unchanged.

Returns:
a reference to this.

void UnicodeSet::caseCloseOne UChar    folded [private]
 

void UnicodeSet::caseCloseOne const CaseEquivClass &    c [private]
 

void UnicodeSet::caseCloseOne const UnicodeString   folded [private]
 

UChar32 UnicodeSet::charAt int32_t    index const
 

Returns the character at the given index within this set, where the set is ordered by ascending code point.

If the index is out of range, return (UChar32)-1. The inverse of this method is indexOf().

Parameters:
index  an index from 0..size()-1
Returns:
the character at the given index, or (UChar32)-1.
Draft:
This API has been introduced in ICU 2.4. It is still in draft state and may be modified in a future release.

virtual UnicodeSet& UnicodeSet::clear void    [virtual]
 

Removes all of the elements from this set.

This set will be empty after this call returns.

Stable:
ICU 2.0

virtual UnicodeFunctor* UnicodeSet::clone void    const [virtual]
 

Returns a copy of this object.

All UnicodeFunctor objects have to support cloning in order to allow classes using UnicodeFunctors, such as Transliterator, to implement cloning.

Stable:
ICU 2.0

Reimplemented from UnicodeFunctor.

UnicodeSet& UnicodeSet::closeOver int32_t    attribute
 

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.)

Parameters:
attribute  bitmask for attributes to close over. Currently only the USET_CASE bit is supported. Any undefined bits are ignored.
Returns:
a reference to this set.
Internal:
For internal use only.

virtual UnicodeSet& UnicodeSet::compact   [virtual]
 

Reallocate this objects internal structures to take up the least possible space, without changing this object's value.

Draft:
This API has been introduced in ICU 2.4. It is still in draft state and may be modified in a future release.

UnicodeSet& UnicodeSet::complement const UnicodeString   s
 

Complement the specified string in this set.

The set will not contain the specified string once the call returns.
Warning: you cannot add an empty string ("") to a UnicodeSet.

Parameters:
s  the string to complement
Returns:
this object, for chaining
Draft:
This API has been introduced in ICU 2.4. It is still in draft state and may be modified in a future release.

UnicodeSet& UnicodeSet::complement UChar32    c
 

Complements the specified character in this set.

The character will be removed if it is in this set, or will be added if it is not in this set.

Stable:
ICU 2.0

virtual UnicodeSet& UnicodeSet::complement UChar32    start,
UChar32    end
[virtual]
 

Complements the specified range in this set.

Any character in the range will be removed if it is in this set, or will be added if it is not in this set. If end > start then an empty range is complemented, leaving the set unchanged. This is equivalent to a boolean logic XOR.

Parameters:
start  first character, inclusive, of range to be removed from this set.
end  last character, inclusive, of range to be removed from this set.
Stable:
ICU 2.0

virtual UnicodeSet& UnicodeSet::complement void    [virtual]
 

Inverts this set.

This operation modifies this set so that its value is its complement. This is equivalent to complement(MIN_VALUE, MAX_VALUE).

Stable:
ICU 2.0

virtual UnicodeSet& UnicodeSet::complementAll const UnicodeSet &    c [virtual]
 

Complements in this set all elements contained in the specified set.

Any character in the other set will be removed if it is in this set, or will be added if it is not in this set.

Parameters:
c  set that defines which elements will be xor'ed from this set.
Draft:
This API has been introduced in ICU 2.4. It is still in draft state and may be modified in a future release.

UnicodeSet& UnicodeSet::complementAll const UnicodeString   s
 

Complement EACH of the characters in this string.

Note: "ch" == {"c", "h"} If this set already any particular character, it has no effect on that character.

Parameters:
s  the source string
Returns:
this object, for chaining
Draft:
This API has been introduced in ICU 2.4. It is still in draft state and may be modified in a future release.

UBool UnicodeSet::contains const UnicodeString   s const
 

Returns true if this set contains the given multicharacter string.

Parameters:
s  string to be checked for containment
Returns:
true if this set contains the specified string
Draft:
This API has been introduced in ICU 2.4. It is still in draft state and may be modified in a future release.

virtual UBool UnicodeSet::contains UChar32    start,
UChar32    end
const [virtual]
 

Returns true if this set contains every character of the given range.

Parameters:
start  first character, inclusive, of the range
end  last character, inclusive, of the range
Returns:
true if the test condition is met
Stable:
ICU 2.0

virtual UBool UnicodeSet::contains UChar32    c const [virtual]
 

Returns true if this set contains the given character.

Parameters:
c  character to be checked for containment
Returns:
true if the test condition is met
Stable:
ICU 2.0

Reimplemented from UnicodeFilter.

UBool UnicodeSet::containsAll const UnicodeString   s const
 

Returns true if this set contains all the characters of the given string.

Parameters:
s  string containing characters to be checked for containment
Returns:
true if the test condition is met
Draft:
This API has been introduced in ICU 2.4. It is still in draft state and may be modified in a future release.

virtual UBool UnicodeSet::containsAll const UnicodeSet &    c const [virtual]
 

Returns true if this set contains all the characters and strings of the given set.

Parameters:
c  set to be checked for containment
Returns:
true if the test condition is met
Draft:
This API has been introduced in ICU 2.4. It is still in draft state and may be modified in a future release.

UBool UnicodeSet::containsNone const UnicodeString   s const
 

Returns true if this set contains none of the characters of the given string.

Parameters:
s  string containing characters to be checked for containment
Returns:
true if the test condition is met
Draft:
This API has been introduced in ICU 2.4. It is still in draft state and may be modified in a future release.

UBool UnicodeSet::containsNone const UnicodeSet &    c const
 

Returns true if this set contains none of the characters and strings of the given set.

Parameters:
c  set to be checked for containment
Returns:
true if the test condition is met
Draft:
This API has been introduced in ICU 2.4. It is still in draft state and may be modified in a future release.

UBool UnicodeSet::containsNone UChar32    start,
UChar32    end
const
 

Returns true if this set contains none of the characters of the given range.

Parameters:
start  first character, inclusive, of the range
end  last character, inclusive, of the range
Returns:
true if the test condition is met
Draft:
This API has been introduced in ICU 2.4. It is still in draft state and may be modified in a future release.

Referenced by containsSome().

UBool UnicodeSet::containsSome const UnicodeString   s const [inline]
 

Returns true if this set contains one or more of the characters of the given string.

Parameters:
s  string containing characters to be checked for containment
Returns:
true if the condition is met
Draft:
This API has been introduced in ICU 2.4. It is still in draft state and may be modified in a future release.

Definition at line 1343 of file uniset.h.

UBool UnicodeSet::containsSome const UnicodeSet &    s const [inline]
 

Returns true if this set contains one or more of the characters and strings of the given set.

Parameters:
s  The set to be checked for containment
Returns:
true if the condition is met
Draft:
This API has been introduced in ICU 2.4. It is still in draft state and may be modified in a future release.

Definition at line 1339 of file uniset.h.

UBool UnicodeSet::containsSome UChar32    start,
UChar32    end
const [inline]
 

Returns true if this set contains one or more of the characters in the given range.

Parameters:
start  first character, inclusive, of the range
end  last character, inclusive, of the range
Returns:
true if the condition is met
Draft:
This API has been introduced in ICU 2.4. It is still in draft state and may be modified in a future release.

Definition at line 1335 of file uniset.h.

UnicodeSet* UnicodeSet::createFrom const UnicodeString   s [static]
 

Makes a set from a multicharacter string.

Thus "ch" => {"ch"}
Warning: you cannot add an empty string ("") to a UnicodeSet.

Parameters:
s  the source string
Returns:
a newly created set containing the given string. The caller owns the return object and is responsible for deleting it.
Draft:
This API has been introduced in ICU 2.4. It is still in draft state and may be modified in a future release.

UnicodeSet* UnicodeSet::createFromAll const UnicodeString   s [static]
 

Makes a set from each of the characters in the string.

Thus "ch" => {"c", "h"}

Parameters:
s  the source string
Returns:
a newly created set containing the given characters The caller owns the return object and is responsible for deleting it.
Draft:
This API has been introduced in ICU 2.4. It is still in draft state and may be modified in a future release.

void UnicodeSet::ensureBufferCapacity int32_t    newLen [private]
 

void UnicodeSet::ensureCapacity int32_t    newLen [private]
 

void UnicodeSet::exclusiveOr const UChar32   other,
int32_t    otherLen,
int8_t    polarity
[private]
 

int32_t UnicodeSet::findCodePoint UChar32    c const [private]
 

Returns the smallest value i such that c < list[i].

Caller must ensure that c is a legal value or this method will enter an infinite loop. This method performs a binary search.

Parameters:
c  a character in the range MIN_VALUE..MAX_VALUE inclusive
Returns:
the smallest integer i in the range 0..len-1, inclusive, such that c < list[i]

const CaseEquivClass* UnicodeSet::getCaseMapOf UChar    folded [static, private]
 

const CaseEquivClass* UnicodeSet::getCaseMapOf const UnicodeString   folded [static, private]
 

virtual UClassID UnicodeSet::getDynamicClassID void    const [virtual]
 

Implement UnicodeFunctor API.

Returns:
The class ID for this object. All objects of a given class have the same class ID. Objects of other classes have different class IDs.
Draft:
This API has been introduced in ICU 2.4. It is still in draft state and may be modified in a future release.

Reimplemented from UnicodeFilter.

const UnicodeSet* UnicodeSet::getInclusions UErrorCode   errorCode [static, private]
 

Return a cached copy of the inclusions list that uprv_getInclusions() produces.

virtual int32_t UnicodeSet::getRangeCount void    const [virtual]
 

Iteration method that returns the number of ranges contained in this set.

See also:
getRangeStart , getRangeEnd
Draft:
This API has been introduced in ICU 2.4. It is still in draft state and may be modified in a future release.

virtual UChar32 UnicodeSet::getRangeEnd int32_t    index const [virtual]
 

Iteration method that returns the last character in the specified range of this set.

See also:
getRangeStart , getRangeEnd
Draft:
This API has been introduced in ICU 2.4. It is still in draft state and may be modified in a future release.

virtual UChar32 UnicodeSet::getRangeStart int32_t    index const [virtual]
 

Iteration method that returns the first character in the specified range of this set.

See also:
getRangeCount , getRangeEnd
Draft:
This API has been introduced in ICU 2.4. It is still in draft state and may be modified in a future release.

int32_t UnicodeSet::getSingleCP const UnicodeString   s [static, private]
 

Returns:
a code point IF the string consists of a single one. otherwise returns -1.
Parameters:
string  to test

UClassID UnicodeSet::getStaticClassID void    [static]
 

Return the class ID for this class.

This is useful only for comparing to a return value from getDynamicClassID(). For example:

 .      Base* polymorphic_pointer = createPolymorphicObject();
 .      if (polymorphic_pointer->getDynamicClassID() ==
 .          Derived::getStaticClassID()) ...
 
Returns:
The class ID for all objects of this class.
Stable:
ICU 2.0

const UnicodeString* UnicodeSet::getString int32_t    index const [private]
 

int32_t UnicodeSet::getStringCount   const [private]
 

virtual int32_t UnicodeSet::hashCode void    const [virtual]
 

Returns the hash code value for this set.

Returns:
the hash code value for this set.
See also:
Object::hashCode()
Stable:
ICU 2.0

int32_t UnicodeSet::indexOf UChar32    c const
 

Returns the index of the given character within this set, where the set is ordered by ascending code point.

If the character is not in this set, return -1. The inverse of this method is charAt().

Returns:
an index from 0..size()-1, or -1
Draft:
This API has been introduced in ICU 2.4. It is still in draft state and may be modified in a future release.

virtual UBool UnicodeSet::isEmpty void    const [virtual]
 

Returns true if this set contains no elements.

Returns:
true if this set contains no elements.
Stable:
ICU 2.0

int32_t UnicodeSet::matchRest const Replaceable   text,
int32_t    start,
int32_t    limit,
const UnicodeString   s
[static, private]
 

Returns the longest match for s in text at the given position.

If limit > start then match forward from start+1 to limit matching all characters except s.charAt(0). If limit < start, go backward starting from start-1 matching all characters except s.charAt(s.length()-1). This method assumes that the first character, text.charAt(start), matches s, so it does not check it.

Parameters:
text  the text to match
start  the first character to match. In the forward direction, text.charAt(start) is matched against s.charAt(0). In the reverse direction, it is matched against s.charAt(s.length()-1).
limit  the limit offset for matching, either last+1 in the forward direction, or last-1 in the reverse direction, where last is the index of the last character to match.
Returns:
If part of s matches up to the limit, return |limit - start|. If all of s matches before reaching the limit, return s.length(). If there is a mismatch between s and text, return 0

UMatchDegree UnicodeSet::matches const Replaceable   text,
int32_t &    offset,
int32_t    limit,
UBool    incremental
[virtual]
 

Implement UnicodeMatcher::matches().

Draft:
This API has been introduced in ICU 2.4. It is still in draft state and may be modified in a future release.

Reimplemented from UnicodeFilter.

virtual UBool UnicodeSet::matchesIndexValue uint8_t    v const [private, virtual]
 

Returns true if this set contains any character whose low byte is the given value.

This is used by RuleBasedTransliterator for indexing.

Reimplemented from UnicodeMatcher.

UBool UnicodeSet::operator!= const UnicodeSet &    o const [inline]
 

Compares the specified object with this set for equality.

Returns true if the specified set is not equal to this set.

Stable:
ICU 2.0

Definition at line 1331 of file uniset.h.

UnicodeSet& UnicodeSet::operator= const UnicodeSet &    o
 

Assigns this object to be a copy of another.

Stable:
ICU 2.0

virtual UBool UnicodeSet::operator== const UnicodeSet &    o const [virtual]
 

Compares the specified object with this set for equality.

Returns true if the two sets have the same size, and every member of the specified set is contained in this set (or equivalently, every member of this set is contained in the specified set).

Parameters:
o  set to be compared for equality with this set.
Returns:
true if the specified set is equal to this set.
Stable:
ICU 2.0

Referenced by operator!=().

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.

Parameters:
s  the source string
Returns:
this object, for chaining
Draft:
This API has been introduced in ICU 2.4. It is still in draft state and may be modified in a future release.

UnicodeSet& UnicodeSet::remove UChar32    c
 

Removes the specified character from this set if it is present.

The set will not contain the specified range once the call returns.

Stable:
ICU 2.0

virtual UnicodeSet& UnicodeSet::remove UChar32    start,
UChar32    end
[virtual]
 

Removes the specified range from this set if it is present.

The set will not contain the specified range once the call returns. If end > start then an empty range is removed, leaving the set unchanged.

Parameters:
start  first character, inclusive, of range to be removed from this set.
end  last character, inclusive, of range to be removed from this set.
Stable:
ICU 2.0

virtual UnicodeSet& UnicodeSet::removeAll const UnicodeSet &    c [virtual]
 

Removes from this set all of its elements that are contained in the specified set.

This operation effectively modifies this set so that its value is the asymmetric set difference of the two sets.

Parameters:
c  set that defines which elements will be removed from this set.
Stable:
ICU 2.0

UnicodeSet& UnicodeSet::removeAll const UnicodeString   s
 

Remove EACH of the characters in this string.

Note: "ch" == {"c", "h"} If this set already any particular character, it has no effect on that character.

Parameters:
s  the source string
Returns:
this object, for chaining
Draft:
This API has been introduced in ICU 2.4. It is still in draft state and may be modified in a future release.

UBool UnicodeSet::resemblesPattern const UnicodeString   pattern,
int32_t    pos
[static]
 

Return true if the given position, in the given pattern, appears to be the start of a UnicodeSet pattern.

Draft:
This API has been introduced in ICU 2.4. It is still in draft state and may be modified in a future release.

UBool UnicodeSet::resemblesPropertyPattern RuleCharacterIterator &    chars,
int32_t    iterOpts
[static, private]
 

UBool UnicodeSet::resemblesPropertyPattern const UnicodeString   pattern,
int32_t    pos
[static, private]
 

Return true if the given position, in the given pattern, appears to be the start of a property set pattern [:foo:], \p{foo}, or \P{foo}, or \N{name}.

void UnicodeSet::retain const UChar32   other,
int32_t    otherLen,
int8_t    polarity
[private]
 

UnicodeSet& UnicodeSet::retain UChar32    c
 

Retain the specified character from this set if it is present.

Stable:
ICU 2.0

virtual UnicodeSet& UnicodeSet::retain UChar32    start,
UChar32    end
[virtual]
 

Retain only the elements in this set that are contained in the specified range.

If end > start then an empty range is retained, leaving the set empty. This is equivalent to a boolean logic AND, or a set INTERSECTION.

Parameters:
start  first character, inclusive, of range to be retained to this set.
end  last character, inclusive, of range to be retained to this set.
Stable:
ICU 2.0

virtual 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.

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

UnicodeSet& UnicodeSet::retainAll const UnicodeString   s
 

Retains EACH of the characters in this string.

Note: "ch" == {"c", "h"} If this set already any particular character, it has no effect on that character.

Parameters:
s  the source string
Returns:
this object, for chaining
Draft:
This API has been introduced in ICU 2.4. It is still in draft state and may be modified in a future release.

int32_t UnicodeSet::serialize uint16_t *    dest,
int32_t    destCapacity,
UErrorCode   ec
const
 

Serializes this set into an array of 16-bit integers.

Serialization (currently) only records the characters in the set; multicharacter strings are ignored.

The array has following format (each line is one 16-bit integer):

length = (n+2*m) | (m!=0?0x8000:0) bmpLength = n; present if m!=0 bmp[0] bmp[1] ... bmp[n-1] supp-high[0] supp-low[0] supp-high[1] supp-low[1] ... supp-high[m-1] supp-low[m-1]

The array starts with a header. After the header are n bmp code points, then m supplementary code points. Either n or m or both may be zero. n+2*m is always <= 0x7FFF.

If there are no supplementary characters (if m==0) then the header is one 16-bit integer, 'length', with value n.

If there are supplementary characters (if m!=0) then the header is two 16-bit integers. The first, 'length', has value (n+2*m)|0x8000. The second, 'bmpLength', has value n.

After the header the code points are stored in ascending order. Supplementary code points are stored as most significant 16 bits followed by least significant 16 bits.

Parameters:
dest  pointer to buffer of destCapacity 16-bit integers. May be NULL only if destCapacity is zero.
destCapacity  size of dest, or zero. Must not be negative.
ec  error code. Will be set to U_INDEX_OUTOFBOUNDS_ERROR if n+2*m > 0x7FFF. Will be set to U_BUFFER_OVERFLOW_ERROR if n+2*m+(m!=0?2:1) > destCapacity.
Returns:
the total length of the serialized format, including the header, that is, n+2*m+(m!=0?2:1), or 0 on error other than U_BUFFER_OVERFLOW_ERROR.
Draft:
This API has been introduced in ICU 2.4. It is still in draft state and may be modified in a future release.

UnicodeSet& UnicodeSet::set UChar32    start,
UChar32    end
 

Make this object represent the range start - end.

If end > start then this object is set to an an empty range.

Parameters:
start  first character in the set, inclusive
end  last character in the set, inclusive
Draft:
This API has been introduced in ICU 2.4. It is still in draft state and may be modified in a future release.

virtual int32_t UnicodeSet::size void    const [virtual]
 

Returns the number of elements in this set (its cardinality), n, where 0 <= n <= 65536.

Returns:
the number of elements in this set (its cardinality).
Stable:
ICU 2.0

void UnicodeSet::swapBuffers void    [private]
 

virtual UnicodeString& UnicodeSet::toPattern UnicodeString   result,
UBool    escapeUnprintable = FALSE
const [virtual]
 

Returns a string representation of this set.

If the result of calling this function is passed to a UnicodeSet constructor, it will produce another set that is equal to this one.

Parameters:
result  the string to receive the rules. Previous contents will be deleted.
escapeUnprintable  if TRUE then convert unprintable character to their hex escape representations, \uxxxx or \Uxxxxxxxx. Unprintable characters are those other than U+000A, U+0020..U+007E.
Stable:
ICU 2.0

Reimplemented from UnicodeMatcher.


Friends And Related Function Documentation

friend class USetAccess [friend]
 

Definition at line 1170 of file uniset.h.

friend class UnicodeSetIterator [friend]
 

Definition at line 1314 of file uniset.h.


Member Data Documentation

const UChar32 UnicodeSet::MAX_VALUE [static]
 

Maximum value that can be stored in a UnicodeSet.

Draft:
This API has been introduced in ICU 2.4. It is still in draft state and may be modified in a future release.

Definition at line 291 of file uniset.h.

const UChar32 UnicodeSet::MIN_VALUE [static]
 

Minimum value that can be stored in a UnicodeSet.

Draft:
This API has been introduced in ICU 2.4. It is still in draft state and may be modified in a future release.

Definition at line 285 of file uniset.h.

UChar32* UnicodeSet::buffer [private]
 

Definition at line 264 of file uniset.h.

int32_t UnicodeSet::bufferCapacity [private]
 

Definition at line 262 of file uniset.h.

int32_t UnicodeSet::capacity [private]
 

Definition at line 261 of file uniset.h.

int32_t UnicodeSet::len [private]
 

Definition at line 260 of file uniset.h.

UChar32* UnicodeSet::list [private]
 

Definition at line 263 of file uniset.h.

UnicodeString UnicodeSet::pat [private]
 

The pattern representation of this set.

This may not be the most economical pattern. It is the pattern supplied to applyPattern(), with variables substituted and whitespace removed. For sets constructed without applyPattern(), or modified using the non-pattern API, this string will be empty, indicating that toPattern() must generate a pattern representation from the inversion list.

Definition at line 277 of file uniset.h.

UVector* UnicodeSet::strings [private]
 

Definition at line 266 of file uniset.h.


The documentation for this class was generated from the following file:
Generated on Mon Nov 24 14:37:03 2003 for ICU 2.8 by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001