std::basic_streambuf::in_avail
来自cppreference.com
< cpp | io | basic streambuf
该页由英文版wiki使用Google Translate机器翻译而来。
该翻译可能存在错误或用词不当。鼠标停留在文本上可以看到原版本。你可以帮助我们修正错误或改进翻译。参见说明请点击这里. |
std::streamsize in_avail(); |
||
返回可在get区的字符的数量。如果读出的位置是可用的,有效地返回egptr() - gptr(),get的面积的大小。在这种情况下,返回的字节数的字节数,可以从缓冲器中提取不调用
underflow()
.原文:
Returns the number of characters available in the get area. If a read position is available, effectively returns egptr() - gptr(), the size of the get area. In this case, the number of bytes returned is the number of bytes that can be extracted from the buffer without calling
underflow()
.如果Get区域是空的,调用
showmanyc()
可在相关联的字符序列的字节数来确定。在这种情况下,返回的值是多少字节,可以从缓冲区中提取,而它的保证underflow()
不会返回Traits::eof
.原文:
If the get area is empty, calls
showmanyc()
to determine the number of bytes available in the associated character sequence. In this case, the value returned is the number of bytes that can be extracted from the buffer while it's guaranteed that underflow()
would not return Traits::eof
.目录 |
[编辑] 参数
(无)
[编辑] 返回值
可用的字符数在get或相关联的字符序列,或-1如果没有字符可在相关的序列.
原文:
The number of characters available in the get area or in the associated character sequence, or -1 if no characters are available in the associated sequence.
[编辑] 示例
本章尚未完成 原因:暂无示例 |
[编辑] 另请参阅
[虚]</div></div>
|
任选地提供可用于从文件中输入的字符数 原文: optionally provides the number of characters available for input from the file (虚拟保护成员函数of std::basic_filebuf )
|
提取已经可用块的字符 原文: extracts already available blocks of characters (公共成员函数of std::basic_istream )
|