Standard library header <cwchar>
From cppreference.net
このヘッダーは元々C標準ライブラリに <wchar.h> として存在していました。
このヘッダは、ナル終端 wide および multibyte 文字列ライブラリの一部です。 また、 C-style I/O 関数と C-style Date からの変換も提供します。
目次 |
マクロ
|
実装定義のヌルポインタ定数
(マクロ定数) |
|
|
WEOF
|
std::wint_t
型の非文字値で、エラーを示すために使用される
(マクロ定数) |
|
WCHAR_MIN
|
wchar_t
の最小有効値
(マクロ定数) |
|
WCHAR_MAX
|
wchar_t
の最大有効値
(マクロ定数) |
型
|
マルチバイト文字列を反復処理するために必要な変換状態情報
(クラス) |
|
|
sizeof
演算子によって返される符号なし整数型
(typedef) |
|
wint_t
|
任意の有効なワイド文字と少なくとも1つの追加の値を保持できる整数型 |
|
カレンダー時間型
(クラス) |
関数
文字列操作 |
|
|
ワイド文字列を別のワイド文字列にコピーする
(関数) |
|
|
ワイド文字列から指定された数のワイド文字を別の文字列にコピーします
(関数) |
|
|
ワイド文字列を別のワイド文字列に追加する
(関数) |
|
|
ワイド文字列から指定された数のワイド文字を別のワイド文字列に追加する
(関数) |
|
ワイド文字列を変換し、
wcscmp
が
wcscoll
と同じ結果を生成するようにする
(関数) |
|
文字列検査 |
|
|
ワイド文字列の長さを返す
(関数) |
|
|
2つのワイド文字列を比較する
(関数) |
|
|
2つのワイド文字列から指定された数の文字を比較する
(関数) |
|
|
現在のロケールに従って2つのワイド文字列を比較する
(関数) |
|
|
ワイド文字列内でワイド文字の最初の出現を検索する
(関数) |
|
|
ワイド文字列内の最後のワイド文字を検索する
(関数) |
|
|
別のワイド文字列内に存在するワイド文字のみで構成される
最大初期セグメントの長さを返す (関数) |
|
|
他のワイド文字列に含まれ
ない
ワイド文字のみで構成される最大の先頭セグメントの長さを返す
(関数) |
|
|
あるワイド文字列の中から、別のワイド文字列に含まれる任意のワイド文字が最初に現れる位置を検索する
(関数) |
|
|
ワイド文字列内で別のワイド文字列の最初の出現を検索する
(関数) |
|
|
ワイド文字列内の次のトークンを検索する
(関数) |
|
ワイド文字配列操作 |
|
|
2つの重複しない配列間で指定された数のワイド文字をコピーする
(関数) |
|
|
2つの配列(重複する可能性あり)間で指定された数のワイド文字をコピーします
(関数) |
|
|
2つの配列から指定された数のワイド文字を比較する
(関数) |
|
|
ワイド文字配列内で最初に現れるワイド文字を検索する
(関数) |
|
|
指定されたワイド文字をワイド文字配列の全位置にコピーする
(関数) |
|
マルチバイト/ワイド文字変換 |
|
|
std::mbstate_t
オブジェクトが初期シフト状態を表しているかどうかをチェックする
(関数) |
|
|
可能であれば、単一バイトのナロウ文字をワイド文字に変換する
(関数) |
|
|
ワイド文字を可能であれば単一バイトのナロー文字に変換する
(関数) |
|
|
次のマルチバイト文字のバイト数を返す(状態を指定)
(関数) |
|
|
状態を指定して次のマルチバイト文字をワイド文字に変換する
(関数) |
|
|
ワイド文字をマルチバイト表現に変換する(状態を指定)
(関数) |
|
|
ナローマルチバイト文字列をワイド文字列に変換する(状態指定)
(関数) |
|
|
ワイド文字列をナローマルチバイト文字列に変換する(状態指定)
(関数) |
|
入力/出力 |
|
|
ファイルストリームからワイド文字を取得する
(関数) |
|
|
ファイルストリームからワイド文字列を取得する
(関数) |
|
|
ファイルストリームにワイド文字を書き込む
(関数) |
|
|
ワイド文字列をファイルストリームに書き込む
(関数) |
|
|
stdin
からワイド文字を読み込む
(関数) |
|
|
ワイド文字を
stdout
に書き込む
(関数) |
|
|
ファイルストリームにワイド文字を戻す
(関数) |
|
|
ファイルストリームをワイド文字I/Oとナロー文字I/Oの間で切り替える
(関数) |
|
|
書式化されたワイド文字入力を
stdin
、ファイルストリーム、またはバッファから読み込む
(関数) |
|
|
(C++11)
(C++11)
(C++11)
|
可変引数リストを使用して
stdin
、ファイルストリーム
またはバッファから書式化されたワイド文字入力を行います (関数) |
|
書式化されたワイド文字出力を
stdout
、ファイルストリーム、またはバッファに出力する
(関数) |
|
|
可変引数リストを使用して書式化されたワイド文字出力を
stdout
・ファイルストリーム
・バッファに出力する (関数) |
|
文字列変換 |
|
|
std::tm
オブジェクトをカスタムワイド文字列のテキスト表現に変換する
(関数) |
|
|
ワイド文字列を整数値に変換する
(関数) |
|
|
ワイド文字列を符号なし整数値に変換する
(関数) |
|
|
ワイド文字列を浮動小数点値に変換する
(関数) |
|
注記
- NULL は以下のヘッダーでも定義されています:
- std::size_t は以下のヘッダーでも定義されています:
-
std::wint_tは以下のヘッダーでも定義されています: - std::tm は以下のヘッダーでも定義されています:
概要
namespace std { using size_t = /* 説明を参照 */; // freestanding using mbstate_t = /* 説明を参照 */; // freestanding using wint_t = /* 説明を参照 */; // freestanding struct tm; int fwprintf(FILE* stream, const wchar_t* format, ...); int fwscanf(FILE* stream, const wchar_t* format, ...); int swprintf(wchar_t* s, size_t n, const wchar_t* format, ...); int swscanf(const wchar_t* s, const wchar_t* format, ...); int vfwprintf(FILE* stream, const wchar_t* format, va_list arg); int vfwscanf(FILE* stream, const wchar_t* format, va_list arg); int vswprintf(wchar_t* s, size_t n, const wchar_t* format, va_list arg); int vswscanf(const wchar_t* s, const wchar_t* format, va_list arg); int vwprintf(const wchar_t* format, va_list arg); int vwscanf(const wchar_t* format, va_list arg); int wprintf(const wchar_t* format, ...); int wscanf(const wchar_t* format, ...); wint_t fgetwc(FILE* stream); wchar_t* fgetws(wchar_t* s, int n, FILE* stream); wint_t fputwc(wchar_t c, FILE* stream); int fputws(const wchar_t* s, FILE* stream); int fwide(FILE* stream, int mode); wint_t getwc(FILE* stream); wint_t getwchar(); wint_t putwc(wchar_t c, FILE* stream); wint_t putwchar(wchar_t c); wint_t ungetwc(wint_t c, FILE* stream); double wcstod(const wchar_t* nptr, wchar_t** endptr); float wcstof(const wchar_t* nptr, wchar_t** endptr); long double wcstold(const wchar_t* nptr, wchar_t** endptr); long int wcstol(const wchar_t* nptr, wchar_t** endptr, int base); long long int wcstoll(const wchar_t* nptr, wchar_t** endptr, int base); unsigned long int wcstoul(const wchar_t* nptr, wchar_t** endptr, int base); unsigned long long int wcstoull(const wchar_t* nptr, wchar_t** endptr, int base); wchar_t* wcscpy(wchar_t* s1, const wchar_t* s2); // フリースタンディング wchar_t* wcsncpy(wchar_t* s1, const wchar_t* s2, size_t n); // freestanding wchar_t* wmemcpy(wchar_t* s1, const wchar_t* s2, size_t n); // freestanding wchar_t* wmemmove(wchar_t* s1, const wchar_t* s2, size_t n); // freestanding wchar_t* wcscat(wchar_t* s1, const wchar_t* s2); // freestanding wchar_t* wcsncat(wchar_t* s1, const wchar_t* s2, size_t n); // freestanding int wcscmp(const wchar_t* s1, const wchar_t* s2); // フリースタンディング int wcscoll(const wchar_t* s1, const wchar_t* s2); int wcsncmp(const wchar_t* s1, const wchar_t* s2, size_t n); // freestanding size_t wcsxfrm(wchar_t* s1, const wchar_t* s2, size_t n); int wmemcmp(const wchar_t* s1, const wchar_t* s2, size_t n); // freestanding const wchar_t* wcschr(const wchar_t* s, wchar_t c); // freestanding wchar_t* wcschr(wchar_t* s, wchar_t c); // フリースタンディング size_t wcscspn(const wchar_t* s1, const wchar_t* s2); // フリースタンディング const wchar_t* wcspbrk(const wchar_t* s1, const wchar_t* s2); // freestanding wchar_t* wcspbrk(wchar_t* s1, const wchar_t* s2); // フリースタンディング const wchar_t* wcsrchr(const wchar_t* s, wchar_t c); // フリースタンディング wchar_t* wcsrchr(wchar_t* s, wchar_t c); // freestanding size_t wcsspn(const wchar_t* s1, const wchar_t* s2); // freestanding const wchar_t* wcsstr(const wchar_t* s1, const wchar_t* s2); // freestanding wchar_t* wcsstr(wchar_t* s1, const wchar_t* s2); // freestanding wchar_t* wcstok(wchar_t* s1, const wchar_t* s2, wchar_t** ptr); // freestanding const wchar_t* wmemchr(const wchar_t* s, wchar_t c, size_t n); // freestanding wchar_t* wmemchr(wchar_t* s, wchar_t c, size_t n); // freestanding size_t wcslen(const wchar_t* s); // freestanding wchar_t* wmemset(wchar_t* s, wchar_t c, size_t n); // freestanding size_t wcsftime(wchar_t* s, size_t maxsize, const wchar_t* format, const tm* timeptr); wint_t btowc(int c); int wctob(wint_t c); // マルチバイト/ワイド文字列と文字変換関数 int mbsinit(const mbstate_t* ps); size_t mbrlen(const char* s, size_t n, mbstate_t* ps); size_t mbrtowc(wchar_t* pwc, const char* s, size_t n, mbstate_t* ps); size_t wcrtomb(char* s, wchar_t wc, mbstate_t* ps); size_t mbsrtowcs(wchar_t* dst, const char** src, size_t len, mbstate_t* ps); size_t wcsrtombs(char* dst, const wchar_t** src, size_t len, mbstate_t* ps); } #define NULL /* 説明を参照 */ // freestanding #define WCHAR_MAX /* 詳細は説明を参照 */ // freestanding #define WCHAR_MIN /* 詳細は説明を参照 */ // freestanding #define WEOF /* 詳細は説明を参照 */ // freestanding
不具合報告
以下の動作変更の欠陥報告書は、以前に公開されたC++規格に対して遡及的に適用されました。
| DR | Applied to | Behavior as published | Correct behavior |
|---|---|---|---|
| LWG 345 | C++98 |
std::tm
was not provided in
<cwchar>
|
provided |