Namensräume
Varianten
Aktionen

std::numpunct

Aus cppreference.com
< cpp‎ | 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.
 
 
Defined in header <locale>
template< class CharT >
class numpunct;
Die Facette std::numpunct kapselt numerische Satzzeichen Präferenzen. Stream I / O-Operationen nutzen std::numpunct durch std::num_get und std::num_put zum Parsen numerische Eingabe und Formatierung numerische Ausgabe .
Original:
The facet std::numpunct encapsulates numeric punctuation preferences. Stream I/O operations use std::numpunct through std::num_get and std::num_put for parsing numeric input and formatting numeric output.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
cpp/locale/locale/facetstd-numpunct-inheritance.svg
Über dieses Bild

Inheritance diagram

Zwei Spezialisierungen werden durch die Standard-Bibliothek zur Verfügung gestellt
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.
Defined in header <locale>
std::numpunct<char>
bietet Äquivalente der "C"-Locale Einstellungen
Original:
provides equivalents of the "C" locale preferences
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
std::numpunct<wchar_t>
bietet Breitzeichen Äquivalente der "C"-Locale Einstellungen
Original:
provides wide character equivalents of the "C" locale preferences
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Inhaltsverzeichnis

[Bearbeiten] Mitglied Typen

Mitglied Typ
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>

[Bearbeiten] Member-Funktionen

Vorlage:cpp/locale/numpunct/dsc truenameVorlage:cpp/locale/numpunct/dsc falsename
baut eine neue numpunct Facette
Original:
constructs a new numpunct facet
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]
zerstört sich eine numpunct Facette
Original:
destructs a numpunct facet
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(geschützt Member-Funktion) [edit]
Beruft do_decimal_point
Original:
invokes do_decimal_point
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]
Beruft do_thousands_sep
Original:
invokes do_thousands_sep
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]
Beruft do_grouping
Original:
invokes do_grouping
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]

[Bearbeiten] Geschützt Member-Funktionen

Vorlage:cpp/locale/numpunct/dsc do truenameVorlage:cpp/locale/numpunct/dsc do falsename
bietet das Zeichen als Dezimalpunkt verwenden
Original:
provides the character to use as decimal point
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(virtuellen geschützten Member-Funktion) [edit]
bietet das Zeichen als Tausendertrennzeichen verwenden
Original:
provides the character to use as thousands separator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(virtuellen geschützten Member-Funktion) [edit]
[virtuell]
stellt die Anzahlen von Ziffern zwischen jedem Paar von Tausenden Separatoren
Original:
provides the numbers of digits between each pair of thousands separators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(virtuellen geschützten Member-Funktion) [edit]

[Bearbeiten] Mitglied widerspricht

static std::locale::id id
ID des Gebietsschemas
Original:
id 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.

(öffentliche Member-Objekt)

[Bearbeiten] Beispiel

Im folgenden Beispiel wird die String-Darstellungen true und false
Original:
The following example changes the string representations of true and false
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

#include <iostream>
#include <locale>
 
struct french_bool : std::numpunct<char> {
    string_type do_truename() const { return "oui"; }
    string_type do_falsename() const { return "non"; }
};
 
int main()
{
    std::cout << "default locale: "
              << std::boolalpha << true << ", " << false << '\n';
    std::cout.imbue(std::locale(std::cout.getloc(), new french_bool()));
    std::cout << "locale with modified numpunct: "
              << std::boolalpha << true << ", " << false << '\n';
}

Output:

default locale: true, false
locale with modified numpunct: oui, non

[Bearbeiten] Siehe auch

schafft eine numpunct Facette für die benannte locale
Original:
creates a numpunct facet for the named locale
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Klassen-Template)