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

std::basic_streambuf::in_avail

std::streamsize in_avail();

?

?

返回GET区域中可用的字符数。如果读取位置可用,则有效地返回egptr() - gptr()的面积。在这种情况下,返回的字节数是可以在不调用缓冲区的情况下从缓冲区中提取的字节数。underflow()...

如果get区域为空,则调用showmanyc()若要确定关联字符序列中可用的字节数,请执行以下操作。在这种情况下,返回的值是可以从缓冲区提取的字节数,而它的%27保证underflow()不会回来Traits::eof...

参数

%280%29

返回值

可用于非阻塞读取的字符数为%28,或者是GET区域的大小,或者是可以从关联字符序列%29读取的字符数,或者-1如果关联序列中没有字符可用,则为showmanyc()能看出来。

另见

showmanyc virtual

optionally provides the number of characters available for input from the file (virtual protected member function of std::basic_filebuf)

readsome

extracts already available blocks of characters (public member function of std::basic_istream)

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

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

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com