在线文档教程
C++
输入/输出 | Input/output

std::basic_ios::narrow

性病:基本[医]监督办::狭窄

char narrow( char_type c, char dfault ) const;

转换当前特定于区域设置的字符。c和它的标准相当。结果被转换为char_typechar如果需要的话。如果不能执行转换,则函数将返回dfault...

有效呼叫std::use_facet<std::ctype<char_type>>(getloc()).narrow(c, dfault...

参数

c-character to convert
dfault-character to return if the conversion was unsuccessful

返回值

字符转换为其标准等效字符,然后转换为char...dfault如果转换失败,则返回。

另见

widenwidens characters (public member function)
narrowinvokes do_narrow (public member function of std::ctype)
wctobnarrows a wide character to a single-byte narrow character, if possible (function)

© cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

http://en.cppreference.com/w/cpp/io/basic[医]IOS/窄