GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
std::moneypunct::curr_symbol,do_curr_symbol(3) C++ Standard Libary std::moneypunct::curr_symbol,do_curr_symbol(3)

std::moneypunct::curr_symbol,do_curr_symbol - std::moneypunct::curr_symbol,do_curr_symbol


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 ")


The object of type string_type holding the currency symbol or code.

// 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");
}


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


do_pos_format provides the formatting pattern for currency values
do_neg_format (virtual protected member function)
[virtual]

2022.07.31 http://cppreference.com

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.