Namensräume
Varianten
Aktionen

std::iswctype

Aus cppreference.com
< cpp‎ | string‎ | wide

 
 
Strings Bibliothek
Null-terminierte Strings
Original:
Null-terminated strings
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Byte-Strings
Multibyte-Strings
Wide Strings
Classes
Original:
Classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_string
char_traits
 
Nullterminierten Wide Strings
Funktionen
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Character Manipulation
Original:
Character manipulation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Umwandlungen in numerische Formate
Original:
Conversions to numeric formats
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
String-Manipulation
Original:
String manipulation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Array-Manipulation
Original:
Array manipulation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
wmemcpy
wmemmove
wmemcmp
wmemchr
wmemset
 
Defined in header <cwctype>
int iswctype( std::wint_t ch, std::wctype_t desc );
Stuft die Breitzeichen wc mit der aktuellen C Gebietsschemas LC_CTYPE Kategorie durch desc identifiziert .
Original:
Classifies the wide character wc using the current C locale's LC_CTYPE category identified by desc.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Inhaltsverzeichnis

[Bearbeiten] Parameter

ch -
die breite Charakter zu klassifizieren
Original:
the wide character to classify
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
desc -
die Kategorie LC_CTYPE, von einem Aufruf std::wctype erhalten
Original:
the LC_CTYPE category, obtained from a call to std::wctype
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

Nicht-Null, wenn der Charakter ch die Eigenschaft von desc in LC_CTYPE Facette der aktuellen C locale erkannt hat .
Original:
Non-zero if the character ch has the property identified by desc in LC_CTYPE facet of the current C locale.
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 <clocale>
#include <cwctype>
#include <iostream>
bool classify(wchar_t ch, const std::string& cat)
{
    return std::iswctype(ch, std::wctype(cat.c_str()));
}
int main()
{
    std::setlocale(LC_ALL, "ja_JP.UTF-8");
    std::cout << "The character \u6c34 is...\n";
    for(std::string s : {"digit", "alpha", "space", "cntrl", "jkanji"})
        std::cout << s << "? " << std::boolalpha << classify(L'\u6c34', s) << '\n';
}

Output:

The character 水 is...
digit? false
alpha? true
space? false
cntrl? false
jkanji? true

[Bearbeiten] Siehe auch

sieht einen Charakter Klassifizierung Kategorie in der aktuellen C locale
Original:
looks up a character classification category in the current C locale
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion) [edit]