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

UnicodeString & MessageFormat::format ( const Formattable source,
int32_t  count,
UnicodeString appendTo,
FieldPosition ignore,
UErrorCode status 
) const

Formats the given array of arguments into a user-readable string. Does not take ownership of the Formattable* array or its contents.

If this format uses named arguments, appendTo is unchanged and status is set to U_ILLEGAL_ARGUMENT_ERROR.

source An array of objects to be formatted.
count The number of elements of 'source'.
appendTo Output parameter to receive result. Result is appended to existing contents.
ignore Not used; inherited from base class API.
status Input/output error code. If the pattern cannot be parsed, set to failure code.
Reference to 'appendTo' parameter. ICU 2.0

Definition at line 1103 of file msgfmt.cpp.

References U_FAILURE.

Referenced by SimpleDateFormat::appendGMT(), DateIntervalFormat::concatSingleDate2TimeInterval(), SimpleDateFormat::construct(), DateIntervalFormat::fallbackFormat(), TimeUnitFormat::format(), RelativeDateFormat::format(), format(), DateTimePatternGenerator::getBestPattern(), Transliterator::getDisplayName(), SimpleDateFormat::initGMTFormatters(), TestMessageFormat::internalFormat(), TestMessageFormat::PatternTest(), TestMessageFormat::sample(), MessageFormatRegressionTest::Test4142938(), TestChoiceFormat::TestComplexExample(), TestMessageFormat::testMsgFormatChoice(), TestMessageFormat::testMsgFormatPlural(), TestMessageFormat::TestRBNF(), TestMessageFormat::testSimpleFormat(), TestMessageFormat::testStaticFormat(), TestMessageFormat::TestUnlimitedArgsAndSubformats(), and RelativeDateFormat::toPattern().

    if (U_FAILURE(success)) 
        return appendTo;
    return format(source, cnt, appendTo, ignore, 0, success);

Generated by  Doxygen 1.6.0   Back to index