名前空間
変種
操作

std::locale::name

提供: cppreference.com
< cpp‎ | locale‎ | locale

 
 
ローカライゼーションライブラリ
ロケールおよびファセット
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
文字分類
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.
変換
Original:
Conversions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ファセットカテゴリの基底クラスです
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.
ファセットカテゴリ
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.
ロケール固有のファセット
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.
コー​​ド変換ファセット
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ロケール
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
メンバータイプ
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
メンバ関数
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()
静的メンバ関数
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;
それはそのような "POSIX"または "en_US.UTF8"または "States.1252 English_United"など、オペレーティングシステムに認識されている名前ですロケールの名前を返します。ロケールは、システム提供のロケールのコピーされていない場合は、文字列 "*"が返されます。.
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.

[編集] 値を返します

ロケールまたは "*"名前をつけない場合の名前.
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.

[編集]

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

[編集] も参照してください

新しいロケールを構築します
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.

(パブリックメンバ関数) [edit]