首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

do_unshift

Defined in header <locale>

public: result unshift( StateT& state, ExternT* to, ExternT* to_end, ExternT*& to_next) const;

(1)

protected: virtual result do_unshift( StateT& state, ExternT* to, ExternT* to_end, ExternT*& to_next) const;

(2)

1%29公共成员函数,调用成员函数。do_unshift最派生的类。

2%29如果由以下代码表示的编码codecvtfacet是状态依赖的,并且state表示不是初始Shift状态的转换状态,写入返回到初始Shift状态所需的字符。将字符写入字符数组,该数组的第一个元素由to.不超过to_end-to文字都是写的。参数to_next更新为指向最后写的字符之一。

返回值

类型值std::codecvt_base::result,说明成功情况如下:

ok

all necessary characters were written. state now represents initial shift state

partial

not enough space in the output buffer. to_next == to_end

error

unspecified error occurred

noconv

the encoding is not state-dependent, no termination sequence necessary

非转换专业化std::codecvt<char, char,std::mbstate_t>总是回来std::codecvt_base::noconv...

注记

此函数由std::basic_filebuf::close()在其他情况下,当最后确定状态相关的多字节字符序列时。

另见

wcrtomb

converts a wide character to its multibyte representation, given state (function)

do_out virtual

converts a string from internT to externT, such as when writing to file (virtual protected member function)

代码语言:txt
复制
 © cppreference.com

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

扫码关注腾讯云开发者

领取腾讯云代金券