名前空間
変種
操作

std::iswctype

提供: cppreference.com
< cpp‎ | string‎ | wide

 
 
ストリングスライブラリ
NULLで終わる文字列
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.
バイト文字列
文字列をマルチバイト
ワイド文字列
クラス
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
 
nullで終了するワイド文字列
機能します
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
文字操作
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.
数値形式への変換
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.
文字列操作
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.
配列操作
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 );
wcによって識別される、現在のCのロケールのLC_CTYPEカテゴリを使用して、ワイド文字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.

目次

[編集] パラメータ

ch -
分類するワイド文字
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 -
std::wctype呼び出しで得られLC_CTYPEカテゴリ、
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.

[編集] 値を返します

非ゼロの文字chは、現在のCロケールのLC_CTYPEファセットにdescによって識別されるプロパティを持っている場合.
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.

[編集]

#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

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

現在の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.

(機能) [edit]