std::moneypunct<CharT,International>::curr_symbol,do_curr_symbol (3) - Linux Manuals
std::moneypunct<CharT,International>::curr_symbol,do_curr_symbol: std::moneypunct<CharT,International>::curr_symbol,do_curr_symbol
Command to display std::moneypunct<CharT,International>::curr_symbol,do_curr_symbol
manual in Linux: $ man 3 std::moneypunct<CharT,International>::curr_symbol,do_curr_symbol
NAME
std::moneypunct<CharT,International>::curr_symbol,do_curr_symbol - std::moneypunct<CharT,International>::curr_symbol,do_curr_symbol
Synopsis
Defined in header <locale>
public: (1)
string_type curr_symbol() const;
protected: (2)
virtual string_type do_curr_symbol() const;
1) Public member function, calls the member function do_curr_symbol of the most derived class.
2) Returns the string used as the currency identifier by this locale. If International (the second template parameter of std::moneypunct) is false, the identifier is usually a single (wide) character, such as "¥" or "$". If International is true, the identifier is usually a four-character string holding the three-character ISO_4217 currency code followed by a space ("JPY " or "USD ")
Return value
The object of type string_type holding the currency symbol or code.
Example
// Run this code
#include <iostream>
#include <locale>
void show_ccy(const char* locname)
{
std::locale loc(locname);
std::cout << locname << " currency symbol is "
<< std::use_facet<std::moneypunct<char, true>>(loc).curr_symbol()
<< "or " << std::use_facet<std::moneypunct<char>>(loc).curr_symbol()
<< " for short\n";
}
int main()
{
show_ccy("en_US.utf8");
show_ccy("ja_JP.utf8");
show_ccy("sv_SE.utf8");
show_ccy("ru_RU.utf8");
show_ccy("vi_VN.utf8");
}
Output:
en_US.utf8 currency symbol is USD or $ for short
ja_JP.utf8 currency symbol is JPY or ¥ for short
sv_SE.utf8 currency symbol is SEK or kr for short
ru_RU.utf8 currency symbol is RUB or руб for short
vi_VN.utf8 currency symbol is VND or ₫ for short
See also
do_pos_format provides the formatting pattern for currency values
do_neg_format (virtual protected member function)
[virtual]
Pages related to std::moneypunct<CharT,International>::curr_symbol,do_curr_symbol
- std::moneypunct<CharT,International>::decimal_point,do_decimal_point (3) - std::moneypunct<CharT,International>::decimal_point,do_decimal_point
- std::moneypunct<CharT,International>::frac_digits,do_frac_digits (3) - std::moneypunct<CharT,International>::frac_digits,do_frac_digits
- std::moneypunct<CharT,International>::grouping,do_grouping (3) - std::moneypunct<CharT,International>::grouping,do_grouping
- std::moneypunct<CharT,International>::moneypunct (3) - std::moneypunct<CharT,International>::moneypunct
- std::moneypunct<CharT,International>::pos_format,do_pos_format,neg_format,do_neg_format (3) - std::moneypunct<CharT,International>::pos_format,do_pos_format,neg_format,do_neg_format
- std::moneypunct<CharT,International>::positive_sign,do_positive_sign,negative_sign, (3) - std::moneypunct<CharT,International>::positive_sign,do_positive_sign,negative_sign,
- std::moneypunct<CharT,International>::positive_sign,do_positive_sign,negative_sign,do_negative_sign (3) - std::moneypunct<CharT,International>::positive_sign,do_positive_sign,negative_sign,do_negative_sign
- std::moneypunct<CharT,International>::thousands_sep,do_thousands_sep (3) - std::moneypunct<CharT,International>::thousands_sep,do_thousands_sep
- std::moneypunct<CharT,International>::~moneypunct (3) - std::moneypunct<CharT,International>::~moneypunct
- std::moneypunct (3) - std::moneypunct
- std::moneypunct_byname (3) - std::moneypunct_byname
- std::money_base (3) - std::money_base
- std::money_get (3) - std::money_get
- std::money_get<CharT,InputIt>::get,do_get (3) - std::money_get<CharT,InputIt>::get,do_get