Espaces de noms
Variantes
Affichages
Actions

std::iswctype

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

 
 
Bibliothèque de chaînes de caractères
Chaînes à zéro terminal
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.
Les chaînes d'octets
Chaines multi-octets
Les chaînes étendues
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
 
Chaînes à zéro terminal de large
Fonctions
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Manipulation caractère
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.
Conversion aux formats numériques
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.
La manipulation de chaînes
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.
La manipulation des tableaux
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
 
Déclaré dans l'en-tête <cwctype>
int iswctype( std::wint_t ch, std::wctype_t desc );
Classe le caractère large wc utilisant catégorie LC_CTYPE de la localisation en cours C identifié par desc .
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.

Sommaire

[modifier] Paramètres

ch -
le caractère large de classer
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 -
la catégorie LC_CTYPE, obtenu par un appel à std::wctype
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.

[modifier] Retourne la valeur

Non nulle si le personnage a ch la propriété identifiée par desc dans la facette LC_CTYPE de la localisation en cours C .
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.

[modifier] Exemple

#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';
}

Résultat :

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

[modifier] Voir aussi

lève une catégorie de classification caractère dans la locale courante C
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.

(fonction) [edit]