Espacios de nombres
Variantes
Acciones

std::locale::name

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

 
 
Localizaciones biblioteca
Locales y facetas
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
Carácter clasificación
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.
Conversiones
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 clases categoría base
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.
Categorías faceta
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.
Específico de la localidad facetas
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.
Facetas código de conversión
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
Tipos de miembros
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
Las funciones miembro
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()
Funciones miembro estáticas
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;
Devuelve el nombre de la configuración regional, que es el nombre por el que es conocido en el sistema operativo, tales como "POSIX" o "en_US.utf8" o "English_United States.1252". Si la localidad no es una copia de un local proporcionado por el sistema, la cadena "*" se devuelve .
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.

[editar] Valor de retorno

El nombre de la localidad o "*" si no identificado .
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.

[editar] Ejemplo

#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 *

[editar] Ver también

construye un nuevo local
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.

(miembro público función) [edit]