std::codecvt::unshift, std::codecvt::do_unshift
来自cppreference.com
该页由英文版wiki使用Google Translate机器翻译而来。
该翻译可能存在错误或用词不当。鼠标停留在文本上可以看到原版本。你可以帮助我们修正错误或改进翻译。参见说明请点击这里. |
在头文件 <locale> 中定义
|
||
public: result unshift( stateT& state, |
(1) | |
protected: result do_unshift( stateT& state, |
(2) | |
公共成员函数,调用最派生类的成员函数
2) do_unshift
.原文:
public member function, calls the member function
do_unshift
of the most derived class.这
codecvt
方面表示,如果编码状态而定,state
是一个转换状态,是不是最初的移位状态,将所需的字符,返回到初始移位状态。字符被写入到一个字符数组的第一个元素是指向to
。写入不超过to_end-to
字符。参数to_next
被更新为指向一个过去的最后一个字符写入.原文:
if the encoding represented by this
codecvt
facet is state-dependent, and state
represents a conversion state that is not the initial shift state, writes the characters necessary to return to the initial shift state. The characters are written to a character array whose first element is pointed to by to
. No more than to_end-to
characters are written. The parameter to_next
is updated to point one past the last character written.目录 |
[编辑] 返回值
值类型std::codecvt_base::result,表示成功的状态如下:
原文:
A value of type std::codecvt_base::result, indicating the success status as follows:
ok
|
所有必要的字符写入。
state 初始移位状态原文: all necessary characters were written. state now represents initial shift state |
partial
|
在输出缓冲区中没有足够的空间。 to_next == to_end
原文: not enough space in the output buffer. to_next == to_end |
error
|
未指定的错误发生
|
noconv
|
编码不是状态而定,没有必要的终止序列
原文: the encoding is not state-dependent, no termination sequence necessary |
非转换专业化std::codecvt<char, char, std::mbstate_t>总是返回std::codecvt_base::noconv
原文:
The non-converting specialization std::codecvt<char, char, std::mbstate_t> always returns std::codecvt_base::noconv
[编辑] 注释
std::basic_filebuf::close()和状态相关的多字节字符序列在其他情况下,最后定稿时,这个函数被调用.
原文:
This function is called by std::basic_filebuf::close() and in other situations when finalizing a state-dependent multibyte character sequence.
[编辑] 示例
本章尚未完成 原因:暂无示例 |
[编辑] 另请参阅
一个宽字符转换为多字节表示,给定的状态 原文: converts a wide character to its multibyte representation, given state (函数) | |
[虚]</div></div>
|
转换成一个字符串,如写入文件时,从Internt的externT 原文: converts a string from internT to externT, such as when writing to file (虚拟保护成员函数) |