cpp/locale/money put/put

Formats monetary value and writes the result to output stream.

@1-2@ Public member functions, call the member function of the most derived class.

@3@ The numeric arguments is converted to a wide character string as if by, where  is the std facet imbued in  and  and  are sufficiently large character buffers. The resulting character string is processed, formatted, and output to  as desribed below.

@4@ From the string argument, only the optional leading minus sign (as determined by comparing to , where is the std facet imbued in ) and the immediately following digit characters (as classified by ) are taken as the character sequence to be processed, formatted, and output to  as described below.

Given the character sequence from the previous steps, if the first character equals, calls to obtain the formatting pattern, otherwise calls , where  is the  facet imbued in.

Thousands separator and decimal point characters are inserted as required by, , , and , and the resulting string is placed in the output sequence where value appears in the formatting pattern.

If is non-zero (the std manipulator was used), then the currency symbol or string is generated by calling  and placed in the output sequence where symbol appears in the formatting pattern.

If (in case positive format pattern is used) or  (in case negative format pattern is used) returns a string with more than one character, the first character returned is placed in the output sequence where sign appears in the formatting pattern, and the rest of the characters are placed after all other characters, for example, formatting pattern  with units  and negative_sign of  may result in, while negative_sign of  would generate.

If the number of characters generated for the specified format is less than the value returned by, then copies of are inserted to bring the total length of the output sequence to exactly , as follows:
 * If equals, the fill characters are inserted where  or  appears in the formatting pattern.
 * Otherwise, if equals, the copies of  are appended after all other characters
 * Otherwise, the fill characters are placed before all other characters.

In the end, calls to cancel the effects of any std.

Return value
An iterator pointing immediately after the last character produced