char8_t
From cppreference.net
Null-terminated multibyte strings
| Functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Wide/multibyte conversions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
(C95)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Types | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Macros | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
ヘッダーで定義
<uchar.h>
|
||
|
typedef
unsigned
char
char8_t
;
|
(C23以降) | |
char8_t はUTF-8用に使用される符号なし整数型であり、 unsigned char と同じ型です。
例
このコードを実行
出力例:
11 UTF-8 code units: [ 7A C3 9F E6 B0 B4 F0 9F 8D 8C 00 ]
参考文献
- C23規格 (ISO/IEC 9899:2024):
-
- 7.30 Unicodeユーティリティ <uchar.h> (p: 410)
関連項目
|
C++ documentation
for
Fundamental types
|
|
C++ documentation
for
Fundamental types
|