Logo Search packages:      
Sourcecode: icu version File versions

UnicodeString & Format::format ( const Formattable obj,
UnicodeString appendTo,
UErrorCode status 
) const [inherited]

Formats an object to produce a string.

Parameters:
obj The object to format.
appendTo Output parameter to receive result. Result is appended to existing contents.
status Output parameter filled in with success or failure status.
Returns:
Reference to 'appendTo' parameter. ICU 2.0

Reimplemented in ChoiceFormat, DateFormat, DecimalFormat, MessageFormat, NumberFormat, RuleBasedNumberFormat, and SimpleDateFormat.

Definition at line 101 of file format.cpp.

References U_FAILURE.

Referenced by NumberFormat::format(), MessageFormat::format(), and DateFormat::format().

{
    if (U_FAILURE(status)) return toAppendTo;

    FieldPosition pos(FieldPosition::DONT_CARE);

    return format(obj, toAppendTo, pos, status);
}


Generated by  Doxygen 1.6.0   Back to index