A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.tutorialspoint.com/cpp_standard_library/cpp_locale_name.htm below:

C++ Locale Library - name

C++ Locale Library - name Description

It used to get a locale name and returns the name of the locale, in an implementation-specific manner.

Declaration

Following is the declaration for std::locale::name.

C++98
	
string name() const;
C++11
string name() const;
Parameters

none

Return Value

It returns a string with the name of the locale, or with "*" if it has no name.

Exceptions

Strong guarantee − if an exception is thrown, there are no effects.

Data races

The locale object is accessed.

Example

In below example explains about std::locale::name.

#include <iostream>
#include <locale>

int main () {
   std::locale loc;

   std::cout << "The global locale should be : " << loc.name() << '\n';

   return 0;
}

Let us compile and run the above program, this will produce the following result −

The global locale should be : C

locale.htm


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