Logo Search packages:      
Sourcecode: icu version File versions

U_STABLE int32_t U_EXPORT2 umsg_format ( const UMessageFormat fmt,
UChar *  result,
int32_t  resultLength,
UErrorCode status,
  ... 
)

Format a message for a locale. This function may perform re-ordering of the arguments depending on the locale. For all numeric arguments, double is assumed unless the type is explicitly integer. All choice format arguments must be of type double.

Parameters:
fmt The formatter to use
result A pointer to a buffer to receive the formatted message.
resultLength The maximum size of result.
status A pointer to an UErrorCode to receive any errors
... A variable-length argument list containing the arguments specified in pattern.
Returns:
The total buffer size needed; if greater than resultLength, the output was truncated. ICU 2.0

Definition at line 345 of file umsg.cpp.

{
    va_list    ap;
    int32_t actLen;  
    //argument checking defered to last method call umsg_vformat which
    //saves time when arguments are valid and we dont care when arguments are not
    //since we return an error anyway

    
    // start vararg processing
    va_start(ap, status);

    actLen = umsg_vformat(fmt,result,resultLength,ap,status);

    // end vararg processing
    va_end(ap);

    return actLen;
}


Generated by  Doxygen 1.6.0   Back to index