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

U_STABLE int32_t U_EXPORT2 uset_toPattern ( const USet set,
UChar *  result,
int32_t  resultCapacity,
UBool  escapeUnprintable,
UErrorCode ec 

Returns a string representation of this set. If the result of calling this function is passed to a uset_openPattern(), it will produce another set that is equal to this one.

set the set
result the string to receive the rules, may be NULL
resultCapacity the capacity of result, may be 0 if result is NULL
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.
ec error code.
length of string, possibly larger than resultCapacity ICU 2.4

Definition at line 129 of file uset_props.cpp.

References UnicodeString::extract().

    UnicodeString pat;
    ((const UnicodeSet*) set)->toPattern(pat, escapeUnprintable);
    return pat.extract(result, resultCapacity, *ec);

Generated by  Doxygen 1.6.0   Back to index