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::locale::name(3) C++ Standard Libary std::locale::name(3)

std::locale::name - std::locale::name


Defined in header <locale>
std::string name() const;


Returns the name of the locale, which is the name by which it is known to the
operating system, such as "POSIX" or "en_US.UTF8" or "English_United States.1252".
If the locale is not a copy of a system-supplied locale, the string "*" is returned.


The name of the locale or "*" if unnamed.

// Run this code


#include <locale>
#include <iostream>
#include <string>


int main()
{
std::locale loc(std::locale(), new std::ctype<char>);
std::cout << "The default locale is " << std::locale().name() << '\n'
<< "The user's locale is " << std::locale("").name() << '\n'
<< "A nameless locale is " << loc.name() << '\n';
}


The default locale is C
The user's locale is en_US.UTF8
A nameless locale is *


constructor constructs a new locale
(public member function)

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.