std::moneypunct_byname
is a std::moneypunct facet which encapsulates monetary formatting preferences of a locale specified at its construction.
The standard library is guaranteed to provide every specialization that satisfies the following type requirements:
CharT
is one of char and wchar_t, andIntl
is a possible specialization on a bool parameter.moneypunct_byname
facet
moneypunct_byname
facet
Constructs a new std::moneypunct_byname
facet for a locale with name.
refs is used for resource management: if refs == 0, the implementation destroys the facet, when the last std::locale object holding it is destroyed. Otherwise, the object is not destroyed.
Parameters name - the name of the locale refs - the number of references that link to the facet std::moneypunct_byname::~moneypunct_bynameprotected:
~moneypunct_byname();
Destroys the facet.
Inherited from std::moneypunct Nested types Data members Member Description std::locale::idid
[static] the identifier of the facet const bool intl
[static] International Member functions invokes do_decimal_point
std::moneypunct<CharT,International>
) [edit] invokes do_thousands_sep
std::moneypunct<CharT,International>
) [edit] invokes do_grouping
std::moneypunct<CharT,International>
) [edit] invokes do_curr_symbol
std::moneypunct<CharT,International>
) [edit] invokes do_positive_sign
or do_negative_sign
std::moneypunct<CharT,International>
) [edit] invokes do_frac_digits
std::moneypunct<CharT,International>
) [edit] invokes do_pos_format
/do_neg_format
std::moneypunct<CharT,International>
) [edit] Protected member functions provides the character to use as decimal point
std::moneypunct<CharT,International>
) [edit] provides the character to use as thousands separator
std::moneypunct<CharT,International>
) [edit] provides the numbers of digits between each pair of thousands separators
std::moneypunct<CharT,International>
) [edit] provides the string to use as the currency identifier
std::moneypunct<CharT,International>
) [edit] provides the string to indicate a positive or negative value
std::moneypunct<CharT,International>
) [edit] provides the number of digits to display after the decimal point
std::moneypunct<CharT,International>
) [edit] provides the formatting pattern for currency values
std::moneypunct<CharT,International>
) [edit] Inherited from std::money_base Nested types Type Definition enum part { none, space, symbol, sign, value }; unscoped enumeration type struct pattern { char field[4]; }; the monetary format type Enumeration constant Description none
whitespace is permitted but not required except in the last position, where whitespace is not permitted space
one or more whitespace characters are required symbol
the sequence of characters returned by std::moneypunct::curr_symbol is required sign
the first of the characters returned by std::moneypunct::positive_sign or std::moneypunct::negative_sign is required value
the absolute numeric monetary value is required [edit] Example
This example demonstrates how to apply monetary formatting rules of another language without changing the rest of the locale.
Output:
american locale: $12,345.67 american locale with russian moneypunct: 12 345.67 ÑÑб[edit] See also
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4