std::numpunct_byname
提供:cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
| Defined in header <locale>
|
||
| template< class charT > class numpunct_byname : public std::numpunct<charT>; |
||
std::numpunct_bynameその建設時に指定したロケールの数値句読点設定をカプセル化std::numpunctファセットです.
Original:
std::numpunct_byname is a std::numpunct facet which encapsulates numeric punctuation preferences of a locale specified at its construction.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
2つの専門分野は、標準ライブラリで提供されています
Original:
Two specializations are provided by the standard library
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
| Defined in header
<locale> | |
| std::numpunct_byname<char> | 狭い文字I / Oのためのロケール固有std::numpunctファセット
Original: locale-specific std::numpunct facet for narrow character I/O The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| std::numpunct_byname<wchar_t> | ワイド文字のロケール固有std::numpunctファセットI / O
Original: locale-specific std::numpunct facet for wide characters I/O The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
目次 |
[編集] メンバータイプ
| メンバー·タイプ
Original: Member type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Definition |
char_type
|
charT
|
string_type
|
std::basic_string<charT> |
[編集] メンバ関数
| 新しいnumpunct_bynameファセットを構築します Original: constructs a new numpunct_byname facet The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
| numpunct_bynameファセットを破棄します Original: destructs a numpunct_byname facet The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (メンバー関数を保護しました) | |
[編集] 例
この例では、ロケールの残りの部分を変更せずに別の言語の数値の区切り文字の規則を適用する方法をdemonistrates .
Original:
This example demonistrates how to apply numeric punctuation rules of another language without changing the rest of the locale.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
#include <iostream> #include <locale> int main() { const double number = 1000.25; std::wcout << L"default locale: " << number << L'\n'; std::wcout.imbue(std::locale(std::wcout.getloc(), new std::numpunct_byname<wchar_t>("ru_RU.UTF8"))); std::wcout << L"default locale with russian numpunct: " << number << L'\n'; }
Output:
default locale: 1000.25 default locale with russian numpunct: 1 000,25
[編集] も参照してください
| 数値の区切り文字の規則を定義します Original: defines numeric punctuation rules The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) | |