std::basic_ios::narrow
性病:基本[医]监督办::狭窄
char narrow( char_type c, char dfault ) const; | | |
---|
转换当前特定于区域设置的字符。c
和它的标准相当。结果被转换为char_type
到char
如果需要的话。如果不能执行转换,则函数将返回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
如果转换失败,则返回。
另见
widen | widens characters (public member function) |
---|---|
narrow | invokes do_narrow (public member function of std::ctype) |
wctob | narrows a wide character to a single-byte narrow character, if possible (function) |
© cppreference.com
在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。