char32_t
From cppreference.com
Defined in header <uchar.h>
|
(since C11) |
|
typedef uint_least32_t char32_t; |
(since C11) | |
typedef /*implementation-defined*/ uint_least32_t; |
(since C99) | |
char32_t is an unsigned integer type used for 32-bit wide characters and is the same type as uint_least32_t.
uint_least32_t is the smallest unsigned integer type with width of at least 32 bits.
Notes
On any given platform, the width of type char32_t can be greater than 32 bits, but the actual values stored in an object of type char32_t will always have a width of 32 bits.
Example
Run this code
Possible output:
5 UTF-32 code units: [ 0x7a 0xdf 0x6c34 0x1f34c 0 ]
References
- C11 standard (ISO/IEC 9899:2011):
- 7.28 Unicode utilities <uchar.h> (p: 398)
- 7.20.1.2 Minimum-width integer types (p: 290)
- C99 standard (ISO/IEC 9899:1999):
- 7.18.1.2 Minimum-width integer types (p: 256)
See also
C++ documentation for char32_t
|