C++ Reference: Standard C++ Library reference: C Library: cwchar

C++官网参考链接:https://cplusplus.com/reference/cwchar/

头文件 
<cwchar> (wchar.h)
宽字符

这个头文件定义了几个处理C宽字符串的函数。

函数 
输入/输出
:(大部分是<cstdio>函数的宽字符版本) 
fgetwc    Get wide character from stream (function)
fgetws    Get wide string from stream (function)
fputwc    Write wide character to stream (function)
fputws    Write wide string to stream (function)
fwide    Stream orientation (function)
fwprintf    Write formatted data to stream (function)
fwscanf    Read formatted data from stream (function)
getwc    Get wide character from stream (function)
getwchar    Get wide character from stdin (function)
putwc    Write wide character to stream (function)
putwchar    Write wide character to stdout (function)
swprintf    Write formatted data to wide string (function)
swscanf    Read formatted data from string (function)
ungetwc    Unget wide character from stream (function)
vfwprintf    Write formatted data from variable argument list to stream (function)
vfwscanf    Read formatted data from stream into variable argument list (function)
vswprintf    Write formatted data from variable argument list to sized buffer (function)
vswscanf    Read formatted data from wide string into variable argument list (function)
vwprintf    Print formatted data from variable argument list to stdout (function)
vwscanf    Read formatted data into variable argument list (function)
wprintf    Print formatted data to stdout (function)
wscanf    Read formatted data from stdin (function)

通用工具:(<cstdlib>函数的宽字符版本)
wcstod    Convert wide string to double (function)
wcstof    Convert wide string to float (function)
wcstol    Convert wide string to long integer (function)
wcstold    Convert wide string to long double (function)
wcstoll    Convert wide string to long long integer (function)
wcstoul    Convert wide string to unsigned long integer (function)
wcstoull    Convert wide string to unsigned long long integer (function)

字符/字符串转换:(大部分是<cstdlib>函数的扩展版本)
btowc    Convert single byte character to wide character (function)
mbrlen    Get length of multibyte character (function)
mbrtowc    Convert multibyte sequence to wide character (function)
mbsinit    Check if initial conversion state (function)
mbsrtowcs    Convert multibyte string to wide-character string (function)
wcrtomb    Convert wide character to multibyte sequence (function)
wctob    Convert wide character to single byte (function)
wcsrtombs    Convert wide-character string to multibyte string (function)

字符串:(<cstring>函数的宽字符版本)
wcscat    Concatenate wide strings (function)
wcschr    Locate first occurrence of character in wide string (function)
wcscmp    Compare two strings (function)
wcscoll    Compare two wide strings using locale (function)
wcscpy    Copy wide string (function)
wcscspn    Get span until character in wide string (function)
wcslen    Get wide string length (function)
wcsncat    Append characters from wide string (function)
wcsncmp    Compare characters of two wide strings (function)
wcsncpy    Copy characters from wide string (function)
wcspbrk    Locate characters in wide string (function)
wcsrchr    Locate last occurrence of character in wide string (function)
wcsspn    Get span of character set in wide string (function)
wcsstr    Locate substring of wide string (function)
wcstok    Split wide string into tokens (function)
wcsxfrm    Transform wide string using locale (function)
wmemchr    Locate character in block of wide characters (function)
wmemcmp    Compare two blocks of wide characters (function)
wmemcpy    Copy block of wide characters (function)
wmemmove    Move block of wide characters (function)
wmemset    Fill array of wide characters (function)

时间:(<ctime>函数的宽字符版本)
wcsftime    Format time as wide string (function)

类型
mbstate_t    Multibyte conversion state (type)
size_t    Unsigned integral type (type)
struct tm    Time structure (type)
wchar_t    Wide character (type)
wint_t    Wide int type (type)

宏常量
NULL    Null pointer (macro)
WCHAR_MAX    Maximum value of wchar_t (constant)
WCHAR_MIN    Minimum value of wchar_t (constant)
WEOF    Wide end-of-file (constant)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

weixin_40186813

你的能量无可限量。

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值