Namensräume
Varianten
Aktionen

std::locale::name

Aus cppreference.com
< cpp‎ | locale‎ | locale

 
 
Lokalisierungen Bibliothek
Locales und Facetten
Original:
Locales and facets
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
locale
Buchstaben-Klassifikation
Original:
Character classification
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Conversions
Original:
Conversions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Facet Kategorie Basisklassen
Original:
Facet category base classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Facet Kategorien
Original:
Facet categories
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Locale-spezifische Facetten
Original:
Locale-specific facets
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Code-Konvertierung Facetten
Original:
Code conversion facets
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
codecvt_utf8(C++11)
codecvt_utf16(C++11)
C locale
Original:
C locale
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 
std::locale
Mitglied Typen
Original:
Member types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
locale::id
locale::facet
Member-Funktionen
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
locale::locale
locale::~locale
locale::operator=
locale::combine
locale::name
locale::operator==
locale::operator!=
locale::operator()
Statische Member-Funktionen
Original:
Static member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
locale::global
locale::classic
 
Defined in header <locale>
std::string name() const;
Gibt den Namen des Lokals, die Namen, unter dem es um das Betriebssystem, wie "POSIX" oder "en_US.utf8" oder "English_United States.1252" bekannt ist. Wenn das Gebietsschema ist keine Kopie eines vom System bereitgestellten Gebietsschema, wird die Zeichenfolge "*" zurückgegeben .
Original:
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 text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[Bearbeiten] Rückgabewert

Der Name des Lokals oder "*", wenn unbenannte .
Original:
The name of the locale or "*" if unnamed.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[Bearbeiten] Beispiel

#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';
}

Output:

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

[Bearbeiten] Siehe auch

baut eine neue locale
Original:
constructs a new locale
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(öffentliche Elementfunktion) [edit]