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

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. A frozen set will not be modified.

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

Implements UnicodeMatcher.

Definition at line 1981 of file uniset.cpp.

References _toPattern(), and UnicodeString::truncate().

Referenced by UnicodeSetTest::checkRoundTrip(), UnicodeSetTest::TestCloseOver(), UnicodeSetTest::Testj2268(), and TransliteratorTest::TestSourceTargetSet().

{
    result.truncate(0);
    return _toPattern(result, escapeUnprintable);
}


Generated by  Doxygen 1.6.0   Back to index