cplusplus
.com
教程
參考
文章
論壇
C++
教程
參考
文章
論壇
參考
C 庫
<cassert> (assert.h)
<cctype> (ctype.h)
<cerrno> (errno.h)
C++11
<cfenv> (fenv.h)
<cfloat> (float.h)
C++11
<cinttypes> (inttypes.h)
<ciso646> (iso646.h)
<climits> (limits.h)
<clocale> (locale.h)
<cmath> (math.h)
<csetjmp> (setjmp.h)
<csignal> (signal.h)
<cstdarg> (stdarg.h)
C++11
<cstdbool> (stdbool.h)
<cstddef> (stddef.h)
C++11
<cstdint> (stdint.h)
<cstdio> (stdio.h)
<cstdlib> (stdlib.h)
<cstring> (string.h)
C++11
<ctgmath> (tgmath.h)
<ctime> (time.h)
C++11
<cuchar> (uchar.h)
<cwchar> (wchar.h)
<cwctype> (wctype.h)
容器
C++11
<array>
<deque>
C++11
<forward_list>
<list>
<map>
<queue>
<set>
<stack>
C++11
<unordered_map>
C++11
<unordered_set>
<vector>
輸入/輸出
<fstream>
<iomanip>
<ios>
<iosfwd>
<iostream>
<istream>
<ostream>
<sstream>
<streambuf>
多執行緒
C++11
<atomic>
C++11
<condition_variable>
C++11
<future>
C++11
<mutex>
C++11
<thread>
其他
<algorithm>
<bitset>
C++11
<chrono>
C++11
<codecvt>
<complex>
<exception>
<functional>
C++11
<initializer_list>
<iterator>
<limits>
<locale>
<memory>
<new>
<numeric>
C++11
<random>
C++11
<ratio>
C++11
<regex>
<stdexcept>
<string>
C++11
<system_error>
C++11
<tuple>
C++11
<type_traits>
C++11
<typeindex>
<typeinfo>
<utility>
<valarray>
<cuchar> (uchar.h)
函式
C++11
c16rtomb
C++11
c32rtomb
C++11
mbrtoc16
C++11
mbrtoc32
參考
<cuchar>
標頭檔案
<cuchar> (uchar.h)
Unicode 字元
該標頭檔案為 16 位和 32 位字元提供支援,適用於 UTF-16 和 UTF-32 編碼。
型別
在 C 語言中,此標頭檔案定義了兩個宏:
char16_t
和
char32_t
,它們分別對映到適當大小的無符號整數型別(與
uint_least16_t
和
uint_least32_t
相同)。
在 C++ 中,
char16_t
和
char32_t
是基本型別(因此,在 C++ 中此標頭檔案不定義這些宏)。
宏
在 C++ 中,此標頭檔案定義了以下宏:
宏
描述
__STD_UTF_16__
如果已定義,則
char16_t
型別的值具有 UTF-16 編碼。
否則,
char16_t
的編碼是未指定的。
(在 C11 中,當該宏被定義時,它會展開為
1
)
__STD_UTF_32__
如果已定義,則
char32_t
型別的值具有 UTF-32 編碼。
否則,
char32_t
的編碼是未指定的。
(在 C11 中,當該宏被定義時,它會展開為
1
)
函式
c16rtomb
將 16 位字元轉換為多位元組序列
(函式)
c32rtomb
將 32 位字元轉換為多位元組序列
(函式)
mbrtoc16
將多位元組序列轉換為 16 位字元
(函式)
mbrtoc32
將多位元組序列轉換為 32 位字元
(函式)
相容性
此標頭檔案最初由一份擴充套件 C99 的技術報告引入 C 語言,並得到 C 和 C++ 最新標準(均於 2011 年釋出)的完全支援。