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

UnicodeSet & UnicodeSet::applyPattern ( const UnicodeString pattern,
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. A frozen set will not be modified.

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 ICU 2.0
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
ignoreSpaces if true, all spaces in the pattern are ignored. Spaces are those characters for which uprv_isRuleWhiteSpace() is true. Characters preceded by '\' are escaped, losing any special meaning they otherwise have. Spaces may be included by escaping them.
Exceptions:
<code>IllegalArgumentException</code> if the pattern contains a syntax error.

Definition at line 409 of file uniset_props.cpp.

References NULL, and USET_IGNORE_SPACE.

Referenced by applyPattern(), UnicodeSetTest::checkRoundTrip(), UnicodeSetTest::TestCloseOver(), UnicodeSetTest::TestMinimalRep(), UnicodeSetTest::TestToPattern(), ThaiBreakEngine::ThaiBreakEngine(), and UnicodeSet().

                                                         {
    return applyPattern(pattern, USET_IGNORE_SPACE, NULL, status);
}


Generated by  Doxygen 1.6.0   Back to index