Namespaces
Variants
Views
Actions

std::basic_streambuf::in_avail

From cppreference.com
< cpp‎ | io‎ | basic streambuf
Revision as of 07:56, 6 December 2012 by Cubbi (Talk | contribs)

 
 
 
 
std::streamsize in_avail();

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 Template:rlpf.

If the get area is empty, calls Template:rlpf 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 Template:rlpf would not return Traits::eof.

Contents

Parameters

(none)

Return value

The number of characters available for non-blocking read (either the size of the get area or the number of characters ready for reading from the associated character sequence), or -1 if no characters are available in the associated sequence as far as Template:rlpf can tell.

Example

See also

Template:cpp/io/basic filebuf/dcl list showmanycTemplate:cpp/io/basic istream/dcl list readsome